gpt4 book ai didi

python - Flask dropbox 导致错误 : ImportError: No module named _winreg

转载 作者:太空宇宙 更新时间:2023-11-03 17:50:57 24 4
gpt4 key购买 nike

因此,每当我将 dropbox 导入 Flask 项目时,都会收到此错误。

例如,即使在示例项目中, https://github.com/WoLpH/dropbox/blob/master/example/flask_app/simple_dropbox_app.py

我怀疑错误是由这一行引起的:

12 DEBUG = True

但我不知道为什么。这是我在没有修改的情况下运行示例项目时得到的错误。

/Downloads/dropbox-master/example/flask_app$ python simple_dropbox_app.py 
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
Traceback (most recent call last):
File "simple_dropbox_app.py", line 167, in <module>
main()
File "simple_dropbox_app.py", line 163, in main
app.run()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 622, in run_simple
reloader_type)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 269, in run_with_reloader
reloader.run()
File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 159, in run
for filename in chain(_iter_module_files(), self.extra_files):
File "/usr/local/lib/python2.7/dist-packages/werkzeug/_reloader.py", line 70, in _iter_module_files
for package_path in getattr(module, '__path__', ()):
File "/usr/lib/python2.7/dist-packages/six.py", line 116, in __getattr__
_module = self._resolve()
File "/usr/lib/python2.7/dist-packages/six.py", line 105, in _resolve
return _import_module(self.mod)
File "/usr/lib/python2.7/dist-packages/six.py", line 76, in _import_module
__import__(name)
ImportError: No module named _winreg

ImportError: No module named _winreg

最佳答案

只需sudo pip install Flask --upgrade。最新版本修复了这个bug!

关于python - Flask dropbox 导致错误 : ImportError: No module named _winreg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29092186/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com