问题描述
我正在与 pyinstaller 一起构建可执行文件,但软件包存在一些问题。在这种情况下,请使用Plotly。
在“ main_dash3.py”程序中,我导入 plotly.express :
import plotly.express as px
错误如下所示。
Traceback (most recent call last):
File "plotly\express\_core.py",line 749,in apply_default_cascade
File "plotly\io\_templates.py",line 89,in __getitem__
File "pkgutil.py",line 637,in get_data
File "c:\users\gabri\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py",line 341,in get_data
with open(path,'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\gabri\\Desktop\\ProjectFolder\\dist\\main_dash3\\plotly\\package_data\\templates\\plotly.json'
During handling of the above exception,another exception occurred:
Traceback (most recent call last):
File "main_dash3.py",line 963,in <module>
File "main_dash3.py",line 571,in Atualiza_HTML
File "plotly\express\_chart_types.py",line 214,in line
File "plotly\express\_core.py",line 1323,in make_figure
File "plotly\express\_core.py",line 752,in apply_default_cascade
File "plotly\graph_objs\layout\__init__.py",line 9431,in __init__
ValueError: The first argument to the plotly.graph_objs.layout.Template
constructor must be a dict or
an instance of plotly.graph_objs.layout.Template
[13892] Failed to execute script main_dash3
我使用此命令来运行pyinstaller
pyinstaller --onedir --console --additional-hooks-dir=hooks --exclude-module=torch --add-data "C:/Users/gabri/Desktop/ProjectFolder/assets;assets/" "C:/Users/gabri/Desktop/ProjectFolder/main_dash3.py"
有人知道如何处理吗?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)