当我使用 plotly 包在 jupyter notebook 中创建地图时,我可以毫无问题地这样做。但是,当我使用相同的代码并将其上传到 Kaggle 内核时,下面是我得到的错误。
NewConnectionError:: 建立新连接失败:[Errno -3] 名称解析暂时失败
在处理上述异常的过程中,又发生了一个异常:
MaxRetryError: HTTPSConnectionPool(host='plot.ly', port=443): Max retries exceeded with url: /clientresp (Caused by NewConnectionError(': Failed to build a new connection: [Errno -3] 名称解析临时失败' ,))
它抛出错误的行是:
py.iplot(fig,validate=False,filename='choropleth-map')
您收到此错误是因为内核当前无法访问 Internet。您仍然可以生成离线 plotly plots。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句