导出\u png正在计时

2024-07-02 13:06:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图将一个bokeh图形保存为png文件,但每当我使用export\u png时,它都会返回以下错误:

    File "/home/tuf60598/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
    File "/home/tuf60598/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
    File "<string>", line 2, in raise_from
    File "/home/tuf60598/anaconda3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
    File "/home/tuf60598/anaconda3/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
    File "/home/tuf60598/anaconda3/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
    File "/home/tuf60598/anaconda3/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
    urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

我这样称呼它:

    p = figure(plot_width=1000, plot_height=1000, x_axis_label='time(in seconds)',y_axis_label='y', title="Accesses over time")`

    p.circle(x, y, size=4, color="navy", alpha=0.5)

    export_png(p, filename="access_over_time.png")

为什么会这样?你知道吗

注意:这只发生在我试图绘制一个有数百万行的数据集时。否则,在处理约有3万行的数据集时,它不会给出任何错误。你知道吗


Tags: inpyhomepngresponselibpackagesline