GibbsConsulting / django-plotly-dash

Expose plotly dash apps as django tags
MIT License
556 stars 125 forks source link

Demo 4 is not working #466

Closed kojnmastyr closed 3 weeks ago

kojnmastyr commented 1 year ago

Page renders, however when clicking on the buttons, there are no points that appear on the time series charts.

Redis is running and should be accepting connections.

The demo is throwing the following errors:

[28/Jun/2023 21:32:37] "GET /ws/channel HTTP/1.1" 404 4012
[28/Jun/2023 21:32:37,497] - Broken pipe from ('127.0.0.1', 38254)
Not Found: /ws/channel

There is one issue related to demo 4, but it looks like a fix has already been applied to #232

delsim commented 1 year ago

@ptluczek that looks a lot like the websocket connection is not being made. Are you able to share your environment (pip freeze, python version, and also what version of the django-plotly-dash git repo)?

GibbsConsulting commented 1 year ago

It seems that restricting the channels package to a version below 3.0 provides a workaround, and also strongly suggests that changes in that package are responsible for this issue.

DOC-MEX commented 1 year ago

Hello, I'm having the same problem with Demo 4.

Firefox can’t establish a connection to the server at ws://127.0.0.1:8000/ws/channel. websocketbridge.js:118:13 The connection to ws://127.0.0.1:8000/ws/channel was interrupted while the page was loading. websocketbridge.js:118:13

the current output of pip freeze is this one:

alabaster==0.7.13 asgiref==3.7.2 astroid==2.15.6 async-timeout==4.0.2 attrs==23.1.0 autobahn==23.1.2 Automat==22.10.0 Babel==2.12.1 backports.zoneinfo==0.2.1 beautifulsoup4==4.12.2 bleach==6.0.0 blinker==1.6.2 certifi==2023.7.22 cffi==1.15.1 channels==4.0.0 channels-redis==4.1.0 charset-normalizer==3.2.0 click==8.1.6 colorama==0.4.6 constantly==15.1.0 coverage==6.5.0 coveralls==3.3.1 cryptography==41.0.3 daphne==4.0.0 dash==2.9.3 dash-bootstrap-components==1.4.2 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-mantine-components==0.12.1 dash-table==5.0.0 dill==0.3.7 Django==4.2.4 django-bootstrap4==23.2 -e git+https://github.com/GibbsConsulting/django-plotly-dash.git@e06bb465c55cb81ec100391031f6c7d259b779b8#egg=django_plotly_dash django-redis==5.3.0 docker==6.1.3 docopt==0.6.2 docutils==0.18.1 dpd-components==0.1.0 dpd-static-support==0.0.5 exceptiongroup==1.1.2 Flask==2.3.2 grip==4.6.1 hyperlink==21.0.0 idna==3.4 imagesize==1.4.1 importlib-metadata==6.8.0 importlib-resources==6.0.0 incremental==22.10.0 iniconfig==2.0.0 isort==5.12.0 itsdangerous==2.1.2 jaraco.classes==3.3.0 jeepney==0.8.0 Jinja2==3.1.2 keyring==24.2.0 lazy-object-proxy==1.9.0 livereload==2.6.3 Markdown==3.4.4 markdown-it-py==3.0.0 MarkupSafe==2.1.3 mccabe==0.7.0 mdurl==0.1.2 more-itertools==10.0.0 msgpack==1.0.5 numpy==1.24.4 packaging==23.1 pandas==2.0.3 path-and-address==2.0.1 pkg_resources==0.0.0 pkginfo==1.9.6 platformdirs==3.10.0 plotly==5.15.0 pluggy==1.2.0 pyasn1==0.5.0 pyasn1-modules==0.3.0 pycparser==2.21 Pygments==2.15.1 pylint==2.17.5 pyOpenSSL==23.2.0 pytest==7.4.0 pytest-cov==4.1.0 pytest-django==4.5.2 python-coveralls==2.9.3 python-dateutil==2.8.2 pytz==2023.3 PyYAML==6.0.1 readme-renderer==40.0 redis==4.6.0 requests==2.31.0 requests-toolbelt==1.0.0 rfc3986==2.0.0 rich==13.5.2 SecretStorage==3.3.3 service-identity==23.1.0 six==1.16.0 snowballstemmer==2.2.0 soupsieve==2.4.1 Sphinx==6.2.1 sphinx-autobuild==2021.3.14 sphinx-rtd-theme==1.2.2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 sqlparse==0.4.4 tenacity==8.2.2 tomli==2.0.1 tomlkit==0.12.1 tornado==6.3.2 twine==4.0.2 Twisted==22.10.0 txaio==23.1.1 typing_extensions==4.7.1 tzdata==2023.3 urllib3==2.0.4 webencodings==0.5.1 websocket-client==1.6.1 Werkzeug==2.3.6 wrapt==1.15.0 zipp==3.16.2 zope.interface==6.0

delsim commented 1 year ago

PR #470 works (for the demo) using both runserver and a production (uvicorn) asgi server. This needs validation before it can be released - and also appears to require a bump in minimum Django version.

GibbsConsulting commented 3 weeks ago

This issue should have been resolved by previous releases. If not, please create a new one.