zvt
zvt copied to clipboard
ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools'
Follow the installation doc,I get the error:
python -m pip install -U zvt
Traceback (most recent call last):
File "/Users/william/development/python/py3.10/bin/zvt", line 5, in <module>
from zvt.main import main
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/zvt/main.py", line 1, in <module>
import dash_bootstrap_components as dbc
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/dash_bootstrap_components/__init__.py", line 6, in <module>
from . import _components
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/dash_bootstrap_components/_components/__init__.py", line 1, in <module>
from .Alert import Alert
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/dash_bootstrap_components/_components/Alert.py", line 3, in <module>
from dash.development.base_component import Component, _explicitize_args
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/dash/__init__.py", line 1, in <module>
from .dash import Dash, no_update # noqa: F401
File "/Users/william/development/python/py3.10/lib/python3.10/site-packages/dash/dash.py", line 22, in <module>
from werkzeug.debug.tbtools import get_current_traceback
ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools' (/Users/william/development/python/py3.10/lib/python3.10/site-packages/werkzeug/debug/tbtools.py)
@IamBusy please use python 3.8
python3 -V Python 3.8.10 also have same problem
any docker image can be used
SinaBlockRecorder:Block
SinaChinaBlockStockRecorder:BlockStock
Traceback (most recent call last):
File "/usr/local/bin/zvt", line 5, in
@IamBusy @xinmans I have met the same problem in Python 3.8 and solved it by:
pip uninstall werkzeug
pip install -v https://github.com/pallets/werkzeug/archive/refs/tags/2.0.1.tar.gz
Solution from https://stackoverflow.com/questions/71654590/dash-importerror-cannot-import-name-get-current-traceback-from-werkzeug-debu.
@IamBusy @xinmans I have met the same problem in Python 3.8 and solved it by:
pip uninstall werkzeug pip install -v https://github.com/pallets/werkzeug/archive/refs/tags/2.0.1.tar.gz
Solution from https://stackoverflow.com/questions/71654590/dash-importerror-cannot-import-name-get-current-traceback-from-werkzeug-debu.
Traceback (most recent call last):
File "/usr/local/bin/zvt", line 5, in
python3 -m pip install --upgrade werkzeug==2.0.3 Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting werkzeug==2.0.3 Downloading https://mirrors.aliyun.com/pypi/packages/f4/f3/22afbdb20cc4654b10c98043414a14057cd27fdba9d4ae61cea596000ba2/Werkzeug-2.0.3-py3-none-any.whl (289 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 289.2/289.2 kB 2.9 MB/s eta 0:00:00 Installing collected packages: werkzeug Attempting uninstall: werkzeug Found existing installation: Werkzeug 2.2.2 Uninstalling Werkzeug-2.2.2: Successfully uninstalled Werkzeug-2.2.2 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. flask 2.2.2 requires Werkzeug>=2.2.2, but you have werkzeug 2.0.3 which is incompatible. Successfully installed werkzeug-2.0.3
/mydev/zvt$ zvt
{'data_path': '/home/xinmans/zvt-home/data',
'log_path': '/home/xinmans/zvt-home/logs',
'tmp_path': '/home/xinmans/zvt-home/tmp',
'ui_path': '/home/xinmans/zvt-home/ui',
'zvt_home': '/home/xinmans/zvt-home'}
2022-10-22 20:28:14,404 INFO MainThread init config for zvt, current_config:{}
{}
2022-10-22 20:28:14,405 INFO MainThread current_config:{}
JoinquantIndexMoneyFlowRecorder:IndexMoneyFlow
{'password': '', 'token': '', 'username': ''}
JoinquantStockMoneyFlowRecorder:StockMoneyFlow
JoinquantHkHolderRecorder:HkHolder
JqChinaIndexKdataRecorder:IndexKdataCommon
JqChinaStockKdataRecorder:StockKdataCommon
JqChinaStockRecorder:Stock
JqChinaEtfRecorder:Etf
JqChinaStockEtfPortfolioRecorder:EtfStock
JqChinaFundRecorder:Fund
JqChinaFundStockRecorder:FundStock
StockTradeDayRecorder:StockTradeDay
MarginTradingRecorder:MarginTrading
JqChinaStockValuationRecorder:StockValuation
JqChinaEtfValuationRecorder:EtfValuation
MarginTradingSummaryRecorder:MarginTradingSummary
StockSummaryRecorder:StockSummary
CrossMarketSummaryRecorder:CrossMarketSummary
ExchangeIndexRecorder:Index
ExchangeIndexStockRecorder:IndexStock
ChinaETFListSpider:EtfStock
ExchangeStockMetaRecorder:Stock
ExchangeStockSummaryRecorder:StockSummary
EMStockKdataRecorder:StockKdataCommon
EMStockusKdataRecorder:StockusKdataCommon
EMStockhkKdataRecorder:StockhkKdataCommon
EMIndexKdataRecorder:IndexKdataCommon
EMIndexusKdataRecorder:IndexusKdataCommon
EMBlockKdataRecorder:BlockKdataCommon
EMFutureKdataRecorder:FutureKdataCommon
EMCurrencyKdataRecorder:CurrencyKdataCommon
EMIndexRecorder:Index
EMStockusRecorder:Stockus
EMCurrencyRecorder:Currency
EMStockhkRecorder:Stockhk
EMBlockRecorder:Block
EMFutureRecorder:Future
EMIndexusRecorder:Indexus
EMStockRecorder:Stock
EMTreasuryYieldRecorder:TreasuryYield
EMStockNewsRecorder:StockNews
EMDragonAndTigerRecorder:DragonAndTiger
EMStockTopTenFreeRecorder:StockTopTenFreeHolder
EMStockActorSummaryRecorder:StockActorSummary
EMStockTopTenRecorder:StockTopTenHolder
EMStockIIRecorder:StockInstitutionalInvestorHolder
WBCountryRecorder:Country
WBEconomyRecorder:Economy
EastmoneyBlockRecorder:Block
EastmoneyBlockStockRecorder:BlockStock
EastmoneyStockRecorder:Stock
EastmoneyStockDetailRecorder:StockDetail
TopTenHolderRecorder:TopTenHolder
TopTenTradableHolderRecorder:TopTenTradableHolder
EastmoneyActorRecorder:ActorMeta
ChinaStockFinanceFactorRecorder:FinanceFactor
ChinaStockIncomeStatementRecorder:IncomeStatement
ChinaStockBalanceSheetRecorder:BalanceSheet
ChinaStockCashFlowRecorder:CashFlowStatement
DividendDetailRecorder:DividendDetail
DividendFinancingRecorder:DividendFinancing
RightsIssueDetailRecorder:RightsIssueDetail
SPODetailRecorder:SpoDetail
ManagerTradingRecorder:ManagerTrading
HolderTradingRecorder:HolderTrading
ChinaETFDayKdataRecorder:Etf1dKdata
ChinaIndexDayKdataRecorder:Index1dKdata
SinaBlockMoneyFlowRecorder:BlockMoneyFlow
SinaStockMoneyFlowRecorder:StockMoneyFlow
SinaBlockRecorder:Block
SinaChinaBlockStockRecorder:BlockStock
Traceback (most recent call last):
File "/home/xinmans/.local/bin/zvt", line 5, in
python3 -m pip install --upgrade flask==2.1.3 to fix it, now can work
refer: https://stackoverflow.com/questions/73337927/typeerror-init-got-an-unexpected-keyword-argument-unbound-message
@xinmans thank you, I had the same issue and your comments helped me to solve it.
Would update all the related dep soon, would solve this problem.
3.7 3.8 3.10都启动不了
pip install flask==2.1.3 werkzeug==2.0.1
这样就可以了,刚试了成功。