Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: failed to send plot to http://127.0.0.1:63342 when trying to plot any NILMTK plot on Pycharm! #959

Open
gdialektakis opened this issue Aug 31, 2022 · 1 comment

Comments

@gdialektakis
Copy link

Hi! I am trying to plot the raw power data of the fridge from the UK-DALE dataset from building 1 using the following code:

import matplotlib.pyplot as plt
from nilmtk import DataSet, MeterGroup

elec = uk_dale.buildings[1].elec
fridge_meter = elec['fridge']
fridge_meter.plot()
plt.show()

However, I receive the following error on Pycharm

Error: failed to send plot to http://127.0.0.1:63342
Traceback (most recent call last):
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 1007, in _send_output
self.send(msg)
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 947, in send
self.connect()
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/http/client.py", line 918, in connect
self.sock = self._create_connection(
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/home/gdialektakis/anaconda3/envs/torch-nilm/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

I don't really understand this error, and the only solution (which was not a solution in the end) was to disable "Show plots in tool window" in Pycharm Settings, which just printed absolutely nothing (no errors, no plot).

I would appreciate any help. Thanks!

@anamaria-cusco
Copy link

Hi @gdialektakis, did you manage to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants