Forums

Using CSV from Computer Files

Hello, I am running a program where I am calling on values from a CSV file on my computer. However, when I use the import csv function, it gives me the error: "No such file or directory: 'C:\Users\Grant\Documents\finalproject\centers.csv'"

How can I get that csv file into a directory on python?

If you want to run code against a CSV file on PythonAnywhere, you need to upload it to our system -- code you run here doesn't have access to files on your computer. You can upload files on the "Files" page, which is linked from the dashboard.

I'm having the same problem. When I click on add file in the Files page, and then add a file, no file gets uploaded.

How big is your file? We do not allow file uploads of >100mb from the file uploader. You could however scp/rsync it up onto PythonAnywhere. See here for more detail.

Perhaps it is timing out before it gets uploaded? Do you see any errors during your upload?