🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Deploying dash app on apache2 - works, but no chart shown

Hi,

I’m trying to deploy a dash app on apache 2 on this subdomain http://dax.fin-tweet.de/. My code works perfectly on the local machine (as you can see in the attached picture). All three functions are provided (drop-down, charting and live-updating).

After the deployment only the drop-down menu is shown. I’m using mod_wsgi as production server.

Please help me, I’m becoming desperate. If you need some further information, code, settings, log, please tell me!

Thank you very much in advance.

Lorenz :slight_smile:

My FlaskApp-error.log shows - FileNotFoundError: File b’collection_data.csv’ does not exist, but the file exists. - Anybody an idea?

The Python process may have a different working directory than your Dash script. You can check by printing the current working directory right before you try to open the file:

import os
print(os.getcwd())

Or if the Apache server is not printing stdout, then just include it in your layout:

app.layout = html.Div(os.getcwd())

If that’s the issue, then you can fix it right by using an absolute path, or explicitly changing the working directory of the Python process.

Thank you! I tried in combination with declaring a static_folder as well. No it works. Thank you!

1 Like