UKBinCollectionData
UKBinCollectionData copied to clipboard
Huntingdon District Council no longer working
Name of Council
Huntingdon District Council
Issue Information
The lookup of collections for Huntingdon District Council no longer functions correctly. I suspect this might be as they have just moved 'Organic Waste' to a new pay for service and so the layout of the page is slightly different now.
Logfile shows:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/uk_bin_collection/sensor.py", line 133, in _async_update_data data = await self.hass.async_add_executor_job(self.ukbcd.run) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 96, in run return self.client_code( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/collect_data.py", line 115, in client_code return get_bin_data_class.template_method(address_url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 66, in template_method bin_data_dict = self.parse_data( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/councils/HuntingdonDistrictCouncil.py", line 32, in parse_data "collectionDate": datetime.strptime(date.find("strong").get_text(strip=True), "%A %d %B %Y").strftime(date_format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get_text' 2024-04-22 14:36:15.382 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up uk_bin_collection platform for sensor
URL showing collection data is https://www.huntingdonshire.gov.uk/refuse-calendar/100090109259
Verification
- [X] I searched for similar issues at https://github.com/robbrad/UKBinCollectionData/issues?q=is:issue and found no duplicates
- [X] I have checked my address/postcode/UPRN works on the council's website
- [X] I have provided a detailed explanation of the issue as well as steps to replicate the issue
- [X] I understand that this project is run by volunteer contributors therefore completion of this issue cannot be guaranteed