Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!