cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Error message when executing Python Script

Jump to solution

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!

1 Solution

Accepted Solutions
Adventurer

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.

View solution in original post

2 Replies
Adventurer

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.

View solution in original post

Hello Daniel, thanks a lot for your prompt reply.

I replaced line 45 and now is running ok.

Best regards!