我的PyCharm的科学绘图模式不适用于本地主机(不是远程的)。它报告说:
Error: failed to send plot to http://127.0.0.1:63342
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pycharm_display/datalore/display/display_.py", line 60, in _send_display_message
urlopen(url, buffer)
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 1379, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/urllib/request.py", line 1354, in do_open
r = h.getresponse()
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/http/client.py", line 1332, in getresponse
response.begin()
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
File "/Users/endaytrer/.conda/envs/NewProject/lib/python3.8/http/client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response我的matplotlib与show plots in tool window在Tools -> Python Scientific中未检查(在原始窗口中绘制而不是在SciView中)正常工作。
更改一些选项,比如调试服务器的端口和Python的解释器(anaconda3 (Python3.7)和Python3.8.3的纯版本)都没有帮助。我还重新初始化了一个项目,重新安装了PyCharm,重新启动了几次,并重置了PyCharm中的所有设置,但是错误仍然发生。
我想我的网络配置有问题,但我不知道该如何做。
系统: macOS 10.15.3 (Hackintosh)
发布于 2020-08-14 13:04:59
这可能是由HTTP代理造成的。如果您在环境变量中设置了http_proxy,请检查并删除。
发布于 2021-06-01 22:55:42
哇,刚刚关闭了我的VPN,它解决了我的问题!
发布于 2020-09-29 07:22:56
我在Windows平台上也遇到了同样的问题。我的操作系统版本是win10 1909年,并使用了最新的PyCharm专业2020.2.2。重新安装这个版本并没有解决问题。
考虑到您正在使用macOS,我不知道这些信息对您是否有用。
https://stackoverflow.com/questions/62919023
复制相似问题