Error message when executing Python Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I'm running a python script to run the student submissions report, but I'm getting an error when trying to download the csv file. I have no experience in python. Could you help on what should I change?
I send attached the script and screencapture with the error obtained.
Any help is welcome.
Regards!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That error message means you don't have permission to write to the directory the file's being written to. Try replacing line 45 with this line that changes the directory the file's being written to:
with open('c:\\temp\\' + status_response_json['attachment']['filename'], 'w+b') as filename:
If you get the same error message, change "c:\\temp\\" to a drive/directory that you know you can write to.