Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

135
Vistas
Django write to csv in views not working

In my views I have:

import csv 
outputfile = open("test.csv", 'w')

I am getting a [Errno 13] Permission Denied

So I tried just opening the file:

outputfile = open("test.csv")

I am getting a [Errno 2] No such file or directory: 'test.csv' when I try to open it.

When I run the same line of code using python manage.py shell, the file opens without an error. test.csv is in the same folder as my views.

Why am I getting these errors and how do I go about fixing them?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda