I tried to use dash with gunicorn.
I took the example " Using Plotly Dash" in user-guide.
/usr/local/miniconda3/bin/python3 app.py # this worked
/usr/local/miniconda3/bin/gunicorn --workers 4 --worker-class gevent --bind 127.0.0.1:8888 app:app.server
Failed to parse ‘app.server’ as an attribute name or function call.
Do you have any idea what I am doing wrong ?
Without seeing the contents of your app.py file, we can only guess. Maybe you forgot to define the server variable (that’s at least what th error message indicates)?
In the app.py file you need to expose the
server = app.server
and then use
gunicorn --workers 4 --worker-class gevent --bind 127.0.0.1:8888 app:server
This solved the problem.
I followed the example In the documentation.
But the code you offered was not included.