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

MertonCouncil: Unexpected error: No connection adapters were found for 'python collect_data.py MertonCouncil #1072

Open
4 tasks done
Ramiel99 opened this issue Dec 6, 2024 · 7 comments · May be fixed by #1088
Open
4 tasks done
Labels
bug Something isn't working

Comments

@Ramiel99
Copy link

Ramiel99 commented Dec 6, 2024

Name of Council

Merton Council

Issue Information

Hi,

I followed the instructions and checked multiple times if everything is configured correctly but I can't seem to get this working.
Below is the log. Any ideas what might be the issue?

2024-12-06 16:54:04.989 DEBUG (MainThread) [custom_components.uk_bin_collection] Finished fetching 30 Merton data in 0.016 seconds (success: False)
2024-12-06 16:54:05.054 DEBUG (MainThread) [custom_components.uk_bin_collection.config_flow] Loaded council data for reconfiguration.
2024-12-06 16:54:13.065 DEBUG (MainThread) [custom_components.uk_bin_collection.config_flow] Reconfigure user input: {'name': 'Merton', 'council': 'Merton Council', 'update_interval': 12, 'url': 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221', 'timeout': 60, 'icon_color_mapping': '{ "Empty Standard General Waste": { "icon": "mdi:trash-can", "color": "black" } }'}
2024-12-06 16:54:13.066 DEBUG (MainThread) [custom_components.uk_bin_collection.config_flow] Mapped wiki name 'Merton Council' to council key 'MertonCouncil'.
2024-12-06 16:54:13.067 INFO (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Setting up UK Bin Collection.
2024-12-06 16:54:13.068 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Retrieved configuration: name=Merton, timeout=60, update_interval=12 hours, icon_color_mapping={ "Empty Standard General Waste": { "icon": "mdi:trash-can", "color": "black" } }
2024-12-06 16:54:13.068 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Built UKBinCollectionApp arguments: ['MertonCouncil', 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221']
2024-12-06 16:54:13.068 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] UKBinCollectionApp args: ['MertonCouncil', 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221']
2024-12-06 16:54:13.074 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] UKBinCollectionApp initialized and arguments set.
2024-12-06 16:54:13.075 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] DataUpdateCoordinator initialized with update_interval=12:00:00.
2024-12-06 16:54:13.075 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] HouseholdBinCoordinator initialized with update_interval=12 hours.
2024-12-06 16:54:13.075 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Starting data fetch with timeout=60 seconds.
2024-12-06 16:54:13.075 INFO (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Fetching latest bin collection data.
2024-12-06 16:54:13.080 ERROR (SyncWorker_19) [uk_bin_collection.uk_bin_collection.get_bin_data] Request Error: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221'
2024-12-06 16:54:13.082 ERROR (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Unexpected error: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221'
Traceback (most recent call last):
File "/config/custom_components/uk_bin_collection/init.py", line 250, in _async_update_data
data = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 101, in run
return self.client_code(
~~~~~~~~~~~~~~~~^
council_module.CouncilClass(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
council_module_str=self.parsed_args.module,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 121, in client_code
return get_bin_data_class.template_method(address_url, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 61, in template_method
bin_data_dict = self.get_and_parse_data(this_url, **kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 81, in get_and_parse_data
page = self.get_data(address_url)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 124, in get_data
full_page = requests.get(url, headers, verify=False, timeout=120)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 697, in send
adapter = self.get_adapter(url=request.url)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?Address=133+Wandle+Road+Morden+SM4+6AA&ID=25968221'
2024-12-06 16:54:13.092 DEBUG (MainThread) [custom_components.uk_bin_collection] Finished fetching Merton data in 0.017 seconds (success: False)
2024-12-06 16:54:13.093 INFO (MainThread) [custom_components.uk_bin_collection.config_flow] Configuration updated for entry: 01JEEDH2KZ3YVS01MPYJS9RR2R

Verification

  • I searched for similar issues at https://github.com/robbrad/UKBinCollectionData/issues?q=is:issue and found no duplicates
  • I have checked my address/postcode/UPRN works on the council's website
  • I have provided a detailed explanation of the issue as well as steps to replicate the issue
  • I understand that this project is run by volunteer contributors therefore completion of this issue cannot be guaranteed
@Ramiel99 Ramiel99 added the bug Something isn't working label Dec 6, 2024
m26dvd added a commit to m26dvd/UKBinCollectionData that referenced this issue Dec 12, 2024
@m26dvd
Copy link
Contributor

m26dvd commented Dec 12, 2024

@Ramiel99 You should drop the "address" attribute out of the URL and only use the "ID" attribute for it to work

@Ramiel99
Copy link
Author

@Ramiel99 You should drop the "address" attribute out of the URL and only use the "ID" attribute for it to work

I have tried that, but it doesn't work. Here is the log:

...<2 lines>...
)
^

File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 101, in run
return self.client_code(
~~~~~~~~~~~~~~~~^
council_module.CouncilClass(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
council_module_str=self.parsed_args.module,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 121, in client_code
return get_bin_data_class.template_method(address_url, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 61, in template_method
bin_data_dict = self.get_and_parse_data(this_url, **kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 81, in get_and_parse_data
page = self.get_data(address_url)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 124, in get_data
full_page = requests.get(url, headers, verify=False, timeout=120)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 697, in send
adapter = self.get_adapter(url=request.url)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680'
2024-12-13 10:47:43.199 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf86b2dd82a8c16bc6l7uo
2024-12-13 10:47:43.912 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bfed4c317bd442b9f9ru2z
2024-12-13 10:47:48.189 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf86b2dd82a8c16bc6l7uo
2024-12-13 10:47:48.901 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bfed4c317bd442b9f9ru2z
2024-12-13 10:47:50.153 INFO (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Setting up UK Bin Collection.
2024-12-13 10:47:50.154 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Retrieved configuration: name=Morden, timeout=60, update_interval=12 hours, icon_color_mapping=
2024-12-13 10:47:50.154 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Built UKBinCollectionApp arguments: ['MertonCouncil', 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680']
2024-12-13 10:47:50.154 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] UKBinCollectionApp args: ['MertonCouncil', 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680']
2024-12-13 10:47:50.159 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] UKBinCollectionApp initialized and arguments set.
2024-12-13 10:47:50.159 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] DataUpdateCoordinator initialized with update_interval=12:00:00.
2024-12-13 10:47:50.159 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] HouseholdBinCoordinator initialized with update_interval=12 hours.
2024-12-13 10:47:50.160 DEBUG (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Starting data fetch with timeout=60 seconds.
2024-12-13 10:47:50.160 INFO (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Fetching latest bin collection data.
2024-12-13 10:47:50.168 ERROR (SyncWorker_30) [uk_bin_collection.uk_bin_collection.get_bin_data] Request Error: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680'
2024-12-13 10:47:50.170 ERROR (MainThread) [custom_components.uk_bin_collection] [UKBinCollection] Unexpected error: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680'
Traceback (most recent call last):
File "/config/custom_components/uk_bin_collection/init.py", line 250, in _async_update_data
data = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 101, in run
return self.client_code(
~~~~~~~~~~~~~~~~^
council_module.CouncilClass(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<9 lines>...
council_module_str=self.parsed_args.module,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 121, in client_code
return get_bin_data_class.template_method(address_url, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 61, in template_method
bin_data_dict = self.get_and_parse_data(this_url, **kwargs)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 81, in get_and_parse_data
page = self.get_data(address_url)
File "/usr/local/lib/python3.13/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 124, in get_data
full_page = requests.get(url, headers, verify=False, timeout=120)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 697, in send
adapter = self.get_adapter(url=request.url)
File "/usr/local/lib/python3.13/site-packages/requests/sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for 'python collect_data.py MertonCouncil https://myneighbourhood.merton.gov.uk/Wasteservices/WasteServices.aspx?ID=25909680'
2024-12-13 10:47:50.176 DEBUG (MainThread) [custom_components.uk_bin_collection] Finished fetching Morden data in 0.016 seconds (success: False)
2024-12-13 10:47:53.204 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf86b2dd82a8c16bc6l7uo

@dp247
Copy link
Collaborator

dp247 commented Dec 13, 2024

I wonder if some of this is down to Python 3.13

@m26dvd
Copy link
Contributor

m26dvd commented Dec 13, 2024

I've just upgraded my HA so it's running Python 3.13 and a test Merton Council service works fine using the link from the OP (albeit there are parsing errors for the date which I'll fix in my next PR)

@Ramiel99
Copy link
Author

Please let me know if you would like me to provide some additional information.

@Ramiel99
Copy link
Author

I have updated to the latest version but there's still the same issue as before.

@dp247
Copy link
Collaborator

dp247 commented Dec 18, 2024

I have updated to the latest version but there's still the same issue as before.

This issue will close when we fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants