Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dash ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools'

I'm trying to run a simple dash app in a conda environment in Pycharm, however I'm running into the error in the title. Weirdly enough, I couldn't find a place on the internet which has a mention of this bug, except for here. The code is simple, as all I'm trying to run is a simple dashapp; code obtained the code from here. I have tried switching between python versions in conda (back and forth between python 3.9, 3.8 and 3.7) but the error seems to be persistent. I know I have also correctly installed all its dependencies as I'm not getting any import error. Would appreciate if anyone could help with this.

Edit: Versions of Dash installed, as requested by @coralvanda : dash_versions

Basically, I just did a pip install of everything so all the versions of packages are the latest.

Screenshot of a full traceback of the error: traceback

like image 752
quiccode Avatar asked Nov 16 '25 03:11

quiccode


2 Answers

I've been in the same problem.

Uninstall the wrong version with:

pip uninstall werkzeug

Install the right one with:

pip install -v https://github.com/pallets/werkzeug/archive/refs/tags/2.0.3.tar.gz
like image 146
Cesarvspr Avatar answered Nov 18 '25 16:11

Cesarvspr


This is caused by dash and fixed in the new 2.3.1 release. So simply do:

pip install -U dash

If that doesn't help, you have to downgrade werkzeug manually, e.g.,

pip install werkzeug==2.0.3
like image 45
CGFoX Avatar answered Nov 18 '25 18:11

CGFoX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!