ivadim / fruitnanny

Raspberry PI based baby monitor
136 stars 56 forks source link

Max retries exceeded with url: /v2/devices - PushBullet ConnectionError #30

Open alogoc opened 4 years ago

alogoc commented 4 years ago

I am having issues with the notification containers , both on temp and motion are constantly restarting and crashing the whole application until I stop them.
I have added the my API key from pushbullet on the configuration file, although I am not sure about the url on the configuration file, does it serve some condition?

Pasted the error below, if anyone has any idea what it could it :

During handling of the above exception, another exception occurred:


  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 334, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0xb60a5750>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.pushbullet.com', port=443): Max retries exceeded with url: /v2/devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb60a5750>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/fruitnanny/bin/temperature.py", line 17, in <module>
    pb = Pushbullet(config.get('NOTIFICATION','Pushbullet_API_Key'))
  File "/usr/local/lib/python3.7/dist-packages/pushbullet/pushbullet.py", line 43, in __init__
    self.refresh()
  File "/usr/local/lib/python3.7/dist-packages/pushbullet/pushbullet.py", line 381, in refresh
    self._load_devices()
  File "/usr/local/lib/python3.7/dist-packages/pushbullet/pushbullet.py", line 78, in _load_devices
    resp_dict = self._get_data(self.DEVICES_URL)
  File "/usr/local/lib/python3.7/dist-packages/pushbullet/pushbullet.py", line 64, in _get_data
    resp = self._session.get(url)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.pushbullet.com', port=443): Max retries exceeded with url: /v2/devices (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0xb60a5750>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))```
SethFroGo commented 2 years ago

Did you ever solve this?