You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to add the City of Unna (Germany) as a source to AbfallnaviDe. HA wasn't able to fetch the data. The service url seems to be wrong for this city.
If I change the service url in 'waste_collection_schedule/service/AbfallnaviDe.py' line 140
from "https://{service_domain}-abfallapp.regioit.de/abfall-app-{service_domain}/rest"
to "https://abfallapp.regioit.de/abfall-app-{service_domain}/rest"
everything is working as expected.
2023-12-22 11:08:59.419 ERROR (SyncWorker_2) [waste_collection_schedule.source_shell] fetch failed forsource AbfallNavi (RegioIT.de):
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 72, in create_connection
forresin socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo
forresin _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fdf9ae1c810>: Failed to establish a new connection: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='unna-abfallapp.regioit.de', port=443): Max retries exceeded with url: /abfall-app-unna/rest/orte (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fdf9ae1c810>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch
entries = self._source.fetch()
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/abfallnavi_de.py", line 56, in fetch
dates = self._api.get_dates(self._ort, self._strasse, self._hausnummer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AbfallnaviDe.py", line 228, in get_dates
city_id = self.get_city_id(city)
^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AbfallnaviDe.py", line 160, in get_city_id
cities = self.get_cities()
^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AbfallnaviDe.py", line 152, in get_cities
cities = self._fetch_json("orte")
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AbfallnaviDe.py", line 148, in _fetch_json
return json.loads(self._fetch(path, params=params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/AbfallnaviDe.py", line 143, in _fetch
r = requests.get(f"{self._service_url}/{path}", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='unna-abfallapp.regioit.de', port=443): Max retries exceeded with url: /abfall-app-unna/rest/orte (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fdf9ae1c810>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
Relevant Configuration
waste_collection_schedule:
sources:
- name: abfallnavi_deargs:
service: unnaort: Unnastrasse: XXXXstraßehausnummer: XX
Checklist Source Error
Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
Checked that the website of your service provider is still working
Tested my attributes on the service provider website (if possible)
I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)
Checklist Sensor Error
Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)
Required
I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
The text was updated successfully, but these errors were encountered:
Fixed by #1557
Fix will be part of release 1.45.0 or is available now as master (git) version (HACS: 3-dot menu -> redownload -> change version to master)
I Have A Problem With:
A specific source
What's Your Problem
I was trying to add the City of Unna (Germany) as a source to AbfallnaviDe. HA wasn't able to fetch the data. The service url seems to be wrong for this city.
If I change the service url in 'waste_collection_schedule/service/AbfallnaviDe.py' line 140
from "https://{service_domain}-abfallapp.regioit.de/abfall-app-{service_domain}/rest"
to "https://abfallapp.regioit.de/abfall-app-{service_domain}/rest"
everything is working as expected.
The service domain is 'unna'.
Here is a url to generate testdata, if needed
https://abfallnavi.de/unna/
Source (if relevant)
AbfallnaviDe
Logs
Relevant Configuration
Checklist Source Error
Checklist Sensor Error
Required
The text was updated successfully, but these errors were encountered: