Dash / Werkzeug: import error when trying to run Dash/Plotly, originating from Werkzeug

0

I recently installed dash and I’m trying to run a basic dash code. However, I’m getting a specific import error which is stemming from Werkzeug (I don’t even know what werkzeug is). I’ve tried downgrading werkzeug to the prior version (0.16.0) as other people said but this did not work. Any advice would be greatly appreciated as I’ve spent a lot of time trying to figure this out. Please see the traceback below:

‘’’

ImportError Traceback (most recent call last) in ----> 1 import dash_core_components as dcc 2 import dash_html_components as html 3 import plotly.express as px 4 import pandas as pd 5

~\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\dash_core_components_ init _.py in 4 import os as _os 5 import sys as _sys ----> 6 import dash as _dash 7 8 _basepath = _os.path.dirname( file )

~\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\dash_ init _.py in ----> 1 from .dash import Dash, no_update # noqa: F401 2 from . import dependencies # noqa: F401 3 from . import development # noqa: F401 4 from . import exceptions # noqa: F401 5 from . import resources # noqa: F401

~\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\dash\dash.py in 20 import flask 21 from flask_compress import Compress —> 22 from werkzeug.debug.tbtools import get_current_traceback 23 24 import plotly

~\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\werkzeug\debug\tbtools.py in 29 from …utils import cached_property 30 from …utils import escape —> 31 from .console import Console 32 33

~\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\werkzeug\debug\console.py in 15 from …local import Local 16 from …utils import escape —> 17 from .repr import debug_repr 18 from .repr import dump 19 from .repr import helper

ImportError: cannot import name ‘debug_repr’ from ‘werkzeug.debug.repr’ (C:\Users\tishll\Anaconda3\AppData\Local\Anaconda3\lib\site-packages\werkzeug\debug\repr.py)’’’

2 Likes

Hi,

Have you resolved your issue? I’m running into similar problem importing dash.

Thanks,
Qing

1 Like

Hi :smiling_face_with_tear: me too. The error is: “ImportError: cannot import name ‘get_current_traceback’ from ‘werkzeug.debug.tbtools’” just this. Pointing with no explanation whatsoever to my C:\ Users…\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\debug\tbtools.py folder. Is it some kind of a permission related problem? I’m admin of my session, but i’m also behind an “allmighty” vpn/f5/palo.alto impenetrable security system, fighting with McAfee Endpoint Security and CrowdStrike Falcon Sensor to get a minimum sight of the so forbidden www evil world. Please share some description of your security enviroment? Just to discart some blocking issue. Thank you in advance!

Could you describe your environment?

Here’s my environment managed with conda,
werkzeug 2.0.3
dash 2.3.0
python 3.10.4
Everything is fine for me.

It’s game over for me… Decided to check McAfee Endpoint Security logs and found this message “\myusename intentó acceder con privilegios elevados a C:\Users\myusername\AppData\Local\Programs\Python\Python310\lib\site-packages\werkzeug\debug\tbtools.py lo que infringe la regla “Malware Behavior: Windows EFS abuse” y fue bloqueado. Para obtener información sobre cómo responder a este evento, consulte KB85494.” Good luck for u, I’m doomed.

1 Like

link to

1 Like

I upgraded Python from 3.9.5 to 3.10.4. Same issue.

1 Like

link to

2 Likes

I was able at least to get the package werkzeug to import without the error by downgrading the version to 2.0.0 manually in pip: pip install -I werkzeug==2.0.0

2 Likes

We’ve released Dash v2.3.1 to address this problem.

4 Likes