Elastic Beanstalk Deployment File Not Found Error

I am trying to deploy a very simple Dash app to elastic beanstalk. It works great (thanks to previous posts by nedned and leemeng ) until I try to import a file via pandas’ read_csv.

Importing the csv works fine when run locally in the virtual environment. So, I don’t think it is a problem with the code. It also deploys with no problem if I use pandas to create the dataframe (instead of importing it) so I don’t think has anything to do with the pandas installation. I have tried changing the csv file’s location to the folder where the requirements.txt file, etc. is located. And, finally, thinking it might be a problem with the size of the csv file, I experimented with importing just a 3x2 table. Still no luck.

When I look at the beanstalk server error log, I do see a ‘FileNotFoundError: File b’C:/Users/…’ does not exist’ error. So, I am guessing that it does have something to do with where the file is located???

This is driving me crazy. Any help you can give would be much appreciated!

Thanks for posting. I’m not super familiar with Beanstalk, but this seems like a general file serving issue.

Check out these previous posts (here and here). While they’re talking about CSS, the same issues apply to local CSVs.

Thanks so much for the response and sorry for the late reply. That was a huge help!