Plot.ly无法与本地Orca服务器通信

时间:2018-12-12 21:02:50

标签: python python-3.x pyinstaller orca

我试图将python脚本作为exe运行,所以我使用pyinstaller。尝试运行exe时,main()执行,然后在执行过程中失败。 这是我的代码“ report graph.py”中的部分,我在其中使用orca并进行绘图

data = [go.Scatter(x=x_points,y=y_points, line = dict(color = ('rgb(0,
0,0)')))]
fig = go.Figure(data = data, layout = layout)

call(['orca', 'graph', json.dumps(fig, cls=plotly.utils.PlotlyJSONEncoder)])
pio.write_image(fig, loc[:-4]+".pdf")
return["Time spent moving: " + with_minutes(time_spent_moving),
("Time spent stopped: " + with_minutes(time_spent_stopped)),
("Time spent off duty: " + with_minutes(time_spent_off_duty))

当我运行exe时,错误显示为:     ValueError:     由于某些原因,plotly.py无法与     本地orca服务器进程,即使服务器进程似乎是
    运行。

Please review the process and connection information below:


orca status
-----------
state: running
executable: C:/ProgramData/Anaconda3/orca_app/orca.exe
version: 1.1.1
port: 53568
pid: 15956
command: 
['C:/ProgramData/Anaconda3/orca_app/orca.exe', 'serve', '-p', '53568', '--
plotly', 'C:\\Users\\dylan\\AppData\\Local\\Temp\\_MEI122962
\\plotly\\package_data\\plotly.min.js', '--graph-only', '--
mathjax', 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js']



[12016] Failed to execute script report graph

0 个答案:

没有答案