FileNotFound Error although /media/sched/schedule.csv exists

You use the url attribute to get a URL to be sent to a browser for the browser to retrieve the file. It’s not needed when you’re retrieving the file in a view.

Accessing the field from the model gives you an instance of a FieldFile. You would call the open method on the field to access the data within the file.

See the docs at Model field reference | Django documentation | Django for all the relevant details. You’ll want to read that section carefully - handling files internally in Django is not the same as processing files in a typical Python program. There are just enough differences to potentially cause confusion.

1 Like