The content of the article comes from the link above, and I summarize it here for my convenience in the future
pycharm报错 Error: failed to send plot to http://127.0.0.1:63342及Connection Refused Error: [Errno 111]
When pycharm runs a drawing.py, an error occurs. It's still good before eating, but it's G after eating
In fact, 这个demo
it has finished running, and the data can be displayed, but an error is reported when displaying the picture, that is, there is a problem with the connection when the picture is sent back from the server to pycharm .
The code I run on the remote server should occupy the port http://127.0.0.1:63342.
Summary of solutions:
- Directly cancel the picture display, settings > tools > Python Scientific uncheck Show plots in tool window (but I just want it to be displayed, this is only applicable to those who can not view the picture. I also tried this method, very nice , But I need diagrams )
- Set up a firewall (basically not because of this one)
- Turn down the dpi setting (probably the image is too large to display)
- Turn off Set Canvas Size
- Run pycharm as an administrator ( I use this method, it's outrageous )
- Close the accumulated images in the drawing window, (there are too many images to display new ones)
- To establish a remote port and a local channel, enter the command in cmd:
ssh -R 63342:127.0.0.1:63342 user@serverIP
(this is temporarily not available) - Turn off the proxy, search for Network and Sharing Center→Internet Properties→Local Area Network (LAN) Settings in the settings, and uncheck the automatic detection and proxy server. (This one is very possible, I saw a lot of people because of this one)
Another way is to save the output picture, and then use the os module to automatically open the picture for viewing.