-
Notifications
You must be signed in to change notification settings - Fork 101
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
Comments
@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:
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 507, in wait_for |
I wonder if some of this is down to Python 3.13 |
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) |
Please let me know if you would like me to provide some additional information. |
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 |
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
The text was updated successfully, but these errors were encountered: