Shiny python app fails on browser reload

Hello,

I am running a Python shiny app from within VScode on Windows; using '> shiny run --reload' in the terminal. The app shows up on 127.0.0.1:8000 and its functionality can be used repeatedly, but if I hit the browser's reload button, the app grays out and I get a _send_error_response: 'All' in the terminal window.

(There is no 'All' in my code. )

If I restart the app by ctrl-C and a new > shiny run --reload, it doesn't autimatically refresh the browser, but the first hit to Reload in the browser makes it come alive. Further hits to Reload, however, give the error.

If I retsart the app by saving the app.py file, its browser window comes alive automatically, but now even the first Reload hit gives the error.

As long as I avoid the browser's Reload button, I am unable to provoke any error using the app.

Anyone seen this behaviour before?

Regards,
Sjur

Terminal window dump and pip list below:

(venv) PS C:\Lokal\PyProj\ODM> shiny run --reload
INFO: Will watch for changes in these directories: ['C:\Lokal\PyProj\ODM']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [15172] using WatchFiles
INFO: Started server process [21904]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: 127.0.0.1:50544 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:50544 - "GET /lib/requirejs-2.3.6/require.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50548 - "GET /lib/htmltools-fill-0.5.7/fill.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50550 - "GET /lib/shiny-0.0.1/shiny.min.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50549 - "GET /lib/bootstrap-5.3.1/bootstrap.min.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50546 - "GET /lib/selectize-0.12.6/css/selectize.bootstrap3.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50547 - "GET /lib/ipywidget-output-binding-0.2.4/shinywidgets.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50547 - "GET /lib/bootstrap-datepicker-1.9.0/css/bootstrap-datepicker3.min.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50548 - "GET /lib/jquery-3.6.0/jquery-3.6.0.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50550 - "GET /lib/bslib-components-0.6.1.9000/components.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50546 - "GET /lib/shiny-0.0.1/shiny.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50544 - "GET /lib/bootstrap-5.3.1/bootstrap.bundle.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50544 - "GET /lib/selectize-0.12.6/js/selectize.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50547 - "GET /lib/shiny-data-frame-output-0.6.1.1/dataframe.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50550 - "GET /lib/ipywidget-libembed-amd-1.0.1/libembed-amd.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50549 - "GET /lib/ipywidget-output-binding-0.2.4/output.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50544 - "GET /lib/bootstrap-datepicker-1.9.0/js/bootstrap-datepicker.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50549 - "GET /lib/bslib-components-0.6.1.9000/components.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50548 - "GET /lib/selectize-0.12.6/accessibility/js/selectize-plugin-a11y.min.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50547 - "GET /__shared/shiny-autoreload.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50546 - "GET /lib/bootstrap-5.3.1/font.css HTTP/1.1" 200 OK
INFO: 127.0.0.1:50546 - "GET /lib/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff HTTP/1.1" 200 OK
INFO: 127.0.0.1:50566 - "GET /lib/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjr0C4k.woff HTTP/1.1" 200 OK
INFO: 127.0.0.1:50567 - "GET /lib/bootstrap-5.3.1/fonts/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DMyQhM0.woff HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 50568) - "WebSocket /websocket/" [accepted]
INFO: connection open
INFO: 127.0.0.1:50566 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50567 - "GET /lib/jupyter-leaflet-0.18/index.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50566 - "GET /lib/ipydatagrid-1.2.0/index.js HTTP/1.1" 200 OK
INFO: 127.0.0.1:50573 - "GET /lib/jupyter-leaflet-0.18/c1e1ed3a9c1ad6a35a55.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50574 - "GET /lib/jupyter-leaflet-0.18/81bf728c0119b97a865c.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50576 - "GET /lib/jupyter-leaflet-0.18/d1ad2f913c5dc1f01a03.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:50575 - "GET /lib/jupyter-leaflet-0.18/63f3cfe3c7682305cb2a.png HTTP/1.1" 404 Not Found
INFO: 127.0.0.1:51826 - "GET / HTTP/1.1" 200 OK
INFO: connection closed
INFO: ('127.0.0.1', 51828) - "WebSocket /websocket/" [accepted]
INFO: connection open
_send_error_response: 'All'
INFO: connection closed
INFO: 127.0.0.1:52441 - "GET / HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 52443) - "WebSocket /websocket/" [accepted]
INFO: connection open
_send_error_response: 'All'
INFO: connection closed
INFO: 127.0.0.1:52448 - "GET / HTTP/1.1" 200 OK
INFO: ('127.0.0.1', 52450) - "WebSocket /websocket/" [accepted]
INFO: connection open
_send_error_response: 'All'
INFO: connection closed

(venv) PS C:\Lokal\PyProj\ODM> pip list
Package Version


anyio 4.2.0
appdirs 1.4.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asgiref 3.7.2
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
bqplot 0.12.42
branca 0.7.0
certifi 2023.11.17
cffi 1.16.0
cftime 1.6.3
charset-normalizer 3.3.2
click 8.1.7
click-plugins 1.1.1
cligj 0.7.2
colorama 0.4.6
colour 0.1.5
comm 0.2.1
contourpy 1.2.0
cycler 0.12.1
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
duckdb 0.9.2
executing 2.0.1
fastjsonschema 2.19.1
filelock 3.13.1
fiona 1.9.5
folium 0.15.1
fonttools 4.47.2
fqdn 1.5.1
gast 0.4.0
gdown 5.0.1
geojson 3.1.0
geopandas 0.14.2
greenlet 3.0.3
h11 0.14.0
htmltools 0.5.1
idna 3.6
ipydatagrid 1.2.0
ipyevents 2.0.2
ipyfilechooser 0.6.0
ipykernel 6.29.0
ipyleaflet 0.18.1
ipython 8.18.0
ipytree 0.2.2
ipywidgets 8.1.1
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.2
json5 0.9.14
jsonpointer 2.4
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter 1.0.0
jupyter_client 8.6.0
jupyter-console 6.6.3
jupyter_core 5.7.0
jupyter-events 0.9.0
jupyter-lsp 2.2.2
jupyter_server 2.12.5
jupyter_server_terminals 0.5.2
jupyterlab 4.0.12
jupyterlab_pygments 0.3.0
jupyterlab_server 2.25.2
jupyterlab-widgets 3.0.9
kiwisolver 1.4.5
leafmap 0.30.1
linkify-it-py 2.0.2
markdown-it-py 3.0.0
MarkupSafe 2.1.3
matplotlib 3.8.2
matplotlib-inline 0.1.6
mdit-py-plugins 0.4.0
mdurl 0.1.2
mistune 3.0.2
nbclient 0.9.0
nbconvert 7.14.2
nbformat 5.9.2
nest-asyncio 1.6.0
netCDF4 1.6.5
notebook 7.0.7
notebook_shim 0.2.3
numpy 1.26.3
overrides 7.7.0
packaging 23.2
pandas 2.1.4
pandocfilters 1.5.1
parso 0.8.3
pillow 10.2.0
pip 23.3.2
platformdirs 4.1.0
plotly 5.18.0
prometheus-client 0.19.0
prompt-toolkit 3.0.36
psutil 5.9.8
pure-eval 0.2.2
py2vega 0.6.1
pycparser 2.21
Pygments 2.17.2
pyodbc 5.0.1
pyparsing 3.1.1
pyproj 3.6.1
pyshp 2.3.1
PySocks 1.7.1
pystac 1.9.0
pystac-client 0.7.5
python-box 7.1.1
python-dateutil 2.8.2
python-json-logger 2.0.7
python-multipart 0.0.6
pytz 2023.3.post1
pywin32 306
pywinpty 2.0.12
PyYAML 6.0.1
pyzmq 25.1.2
qtconsole 5.5.1
QtPy 2.4.1
questionary 2.0.1
referencing 0.33.0
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.17.1
scooby 0.9.2
Send2Trash 1.8.2
setuptools 65.5.0
shapely 2.0.2
shiny 0.6.1.1
shinywidgets 0.2.4
six 1.16.0
sniffio 1.3.0
soupsieve 2.5
SQLAlchemy 2.0.25
stack-data 0.6.3
starlette 0.34.0
tenacity 8.2.3
terminado 0.18.0
tinycss2 1.2.1
tornado 6.4
tqdm 4.66.1
traitlets 5.14.1
traittypes 0.2.1
types-python-dateutil 2.8.19.20240106
typing_extensions 4.9.0
tzdata 2023.4
uc-micro-py 1.0.2
uri-template 1.3.0
urllib3 2.1.0
uvicorn 0.25.0
watchfiles 0.21.0
wcwidth 0.2.12
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0
websockets 12.0
whitebox 2.3.1
whiteboxgui 2.3.0
widgetsnbextension 4.0.9
xyzservices 2023.10.1

[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
(venv) PS C:\Lokal\PyProj\ODM>

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.