Forums

Addressing a file in python code.

Hello I have uploaded a python code at "https://www.pythonanywhere.com". This code refers to an external file (*.docx file) and it is used in the code. I uploaded the file to the site, but what address should I give it? I used the following address, but it is not correct: 'https://www.pythonanywhere.com/user/My_ID/files/home/My_ID/Questions.docx' I appreciate answers.

That is the URL where you can view the file if you are logged into your account, but you can't reference it from your code like that. Are you running your code in a web app, console or task? What exactly are you trying to do with that file?