You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As soon as I run : app.run_server(mode='inline') an error is thrown with message:
[2024-09-13 15:41:45,496] ERROR in app: Exception on /_alive_0ded12ab-0b05-44c0-a874-6b2a8c7f5800 [GET]
Traceback (most recent call last):
File "\?[C:\Users\Gebruiker\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\flask\app.py", line 1473](file:///C:/Users/Gebruiker/AppData/Roaming/jupyterlab-desktop/jlab_server/Lib/site-packages/flask/app.py#line=1472), in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... ...
File "\?[C:\Users\User\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\dash\dash.py", line 844](file:///C:/Users/Gebruiker/AppData/Roaming/jupyterlab-desktop/jlab_server/Lib/site-packages/dash/dash.py#line=843), in _relative_url_path
modified = int(os.stat(module_path).st_mtime)
^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 123] The syntaxis of filename, folder name or volume name is incorrect: '\\?\C:\Users\Gebruiker\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\dash\deps/[email protected]'
And then an Internal Server Error
Expected behavior
At least not an error, I expect a nice chart or so
Quick Fix
As I have a local installation on my Windows PC, I fixed the problem by bluntly replacing the forward slash (/) with an escaped backslash:
in 'dash.py' I added in line 840: relative_package_path = relative_package_path.replace("/", "\\")
If applicable, add screenshots or screen recording to help explain your problem.
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[BUG]Dash on Windows crashes with Syntax Error due to forward slash in Windows path
Dash on Windows crashes with Syntax Error due to forward slash in Windows path
Sep 16, 2024
I did a Quick-Fix to solve this issue for myself (see below), but I like to share my findings here and give opportunity to fix this properly.
Describe your context
I run JupyterLab Desktop on Windows 11 (64-bit)
Then I import dash like so:
Output of pip list is:
Describe the bug
As soon as I run :
app.run_server(mode='inline')
an error is thrown with message:[2024-09-13 15:41:45,496] ERROR in app: Exception on /_alive_0ded12ab-0b05-44c0-a874-6b2a8c7f5800 [GET]
Traceback (most recent call last):
File "\?[C:\Users\Gebruiker\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\flask\app.py", line 1473](file:///C:/Users/Gebruiker/AppData/Roaming/jupyterlab-desktop/jlab_server/Lib/site-packages/flask/app.py#line=1472), in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
... ...
File "\?[C:\Users\User\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\dash\dash.py", line 844](file:///C:/Users/Gebruiker/AppData/Roaming/jupyterlab-desktop/jlab_server/Lib/site-packages/dash/dash.py#line=843), in _relative_url_path
modified = int(os.stat(module_path).st_mtime)
^^^^^^^^^^^^^^^^^^^^
OSError: [WinError 123] The syntaxis of filename, folder name or volume name is incorrect: '\\?\C:\Users\Gebruiker\AppData\Roaming\jupyterlab-desktop\jlab_server\Lib\site-packages\dash\deps/[email protected]'
And then an Internal Server Error
Expected behavior
At least not an error, I expect a nice chart or so
Quick Fix
As I have a local installation on my Windows PC, I fixed the problem by bluntly replacing the forward slash (/) with an escaped backslash:
in 'dash.py' I added in line 840:
relative_package_path = relative_package_path.replace("/", "\\")
If applicable, add screenshots or screen recording to help explain your problem.
The text was updated successfully, but these errors were encountered: