我在启动软件时遇到此错误我不知道如何修复此
Traceback (most recent call last):
File "/root/findex/lib/python3.5/site-packages/findex_gui/main.py", line 208, in web
run_async()
File "/root/findex/lib/python3.5/site-packages/findex_gui/main.py", line 201, in run_async
from findex_gui.web import app
File "/root/findex/lib/python3.5/site-packages/findex_gui/web.py", line 41, in <module>
from findex_gui.orm.connect import Database
File "/root/findex/lib/python3.5/site-packages/findex_gui/orm/connect.py", line 12, in <module>
from findex_gui.orm.models import BASE
File "/root/findex/lib/python3.5/site-packages/findex_gui/orm/models.py", line 22, in <module>
from findex_common.utils import rand_str
ImportError: cannot import name 'rand_str'
答案 0 :(得分:3)
我对这个库不熟悉,但似乎维护者在findex-common
的0.15.14中重命名了这个函数:development
虽然它似乎没有发布,但已在主分支的findex-gui
中进行了调整。这是修复导入的提交:Forgot what I was doing - Ill just push it all ¯_(ツ)_/¯
一个短期解决方案是降级到findex-common==0.15.13
,并可能通过在either project上提出问题来跟进,因为此更改似乎并不理想。