-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
In summary I am using Apache as the web-server, but the importing of app causes the error:
'Read-only: can only be set in the Dash constructor or during init_app()'
This seems to be similar to #1907. All works fine with dash 2.0.0, but breaks with 2.1.0.
Detailed explanation:
Following https://dash.plotly.com/urls we have:
- app.py
- pages
|-- __init__.py
|-- page1.py
|-- page2.py
We also have the modwsgi python file, /var/www/path_to_site/site_name.wsgi, which Apache is set-up to use, this is what is causing the error:
import sys
sys.path.insert(0, "/var/www/path_to_site/")
from site_name.app import server as applicationand the Apache settings /etc/httpd/sites-enabled/site_name.conf
<VirtualHost *:80>
ServerName server_name
WSGIDaemonProcess site_name home=/var/www/path_to_site processes=4 threads=12 python-home=/var/www/path_to_site/venv
WSGIScriptAlias /st40_phys_viewer /var/www/path_to_site/site_name.wsgi
<Directory /var/www/path_to_site>
WSGIProcessGroup site_name
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/path_to_site/assets>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Metadata
Metadata
Assignees
Labels
No labels