How to upload a Multi Page Dash app with a CSV file as data source to heroku or Pythonanywhere?

I have a multi page dash app that uses a csv as the data source, and when I try to upload the app to heroku it gives me an error. The way the data is called, along with the file structure is probably the issue but I dont know how to fix it.

file structure:
-assets
-pages
–pg1.py
–pg2.py
-app.py
-data1.csv

code to read csv:
df = pd.read_csv(“data1.csv”)

error was no file directory found

hi @Ashankar
:wave: welcome to the community

Given that heroku’s free tier is ending in a couple of months, I recommend trying to deploy your app to render.com for now.

I deployed this app to the web using render. See how I put the csv file in the assets folder, and then I refer to it in the projects page on line 8. And deploying to render was easier for me than heroku.

1 Like