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

Parsing error for Argyll & Bute council #1053

Open
4 tasks done
allanvbcrew opened this issue Nov 24, 2024 · 3 comments
Open
4 tasks done

Parsing error for Argyll & Bute council #1053

allanvbcrew opened this issue Nov 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@allanvbcrew
Copy link

Name of Council

Argyll and Bute

Issue Information

Failed setup for Argyll and Bute data. Tried with different UPRN and confirmed website is returning correct data.
Logs show an error : [UKBinCollection] Unexpected error: 'NoneType' object has no attribute 'find_all'

Logs below :

Logger: custom_components.uk_bin_collection
Source: custom_components/uk_bin_collection/init.py:250
integration: UK Bin Collection Data (documentation, issues)
First occurred: 21:14:51 (77 occurrences)
Last logged: 22:24:12

[UKBinCollection] Unexpected error: 'NoneType' object has no attribute 'find_all'
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(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
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 101, in run
return self.client_code(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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.12/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.12/site-packages/uk_bin_collection/uk_bin_collection/get_bin_data.py", line 82, in get_and_parse_data
bin_data_dict = self.parse_data(page, url=address_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uk_bin_collection/uk_bin_collection/councils/ArgyllandButeCouncil.py", line 38, in parse_data
rows = table.find_all("tr")[1:] # Skip the header row
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find_all'

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
@allanvbcrew allanvbcrew added the bug Something isn't working label Nov 24, 2024
@m26dvd
Copy link
Contributor

m26dvd commented Nov 26, 2024

It looks like the council have changed their form to include a time based honeypot. The scraper will need some work to get round this

@allanvbcrew
Copy link
Author

It looks like the council have changed their form to include a time based honeypot. The scraper will need some work to get round this

Thanks, anyway I can help?

@dp247
Copy link
Collaborator

dp247 commented Dec 17, 2024

Definitely needs converting to use Selenium rather than requests

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

No branches or pull requests

3 participants