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

[Bug]: Issue with Portsmouth UK returning an error #1440

Closed
6 of 7 tasks
snigehere opened this issue Nov 22, 2023 · 2 comments · Fixed by #1442
Closed
6 of 7 tasks

[Bug]: Issue with Portsmouth UK returning an error #1440

snigehere opened this issue Nov 22, 2023 · 2 comments · Fixed by #1442

Comments

@snigehere
Copy link

I Have A Problem With:

A specific source

What's Your Problem

I have been using the integration for a while - a couple of days ago I saw that the sensor was reporting as unavailable. Checking I see errors reported in the logs. UPRN is 1775062139

I am not a code person so have not been able to construct the URL to be able to test this but have been onto the portal and am able to find my collection schedule following the site prompts.

Hope this is helpful

Source (if relevant)

portsmouth_gov_uk.py

Logs

2023-11-21 21:56:43.826 ERROR (SyncWorker_2) [waste_collection_schedule.source_shell] fetch failed for source Portsmouth City Council:
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/portsmouth_gov_uk.py", line 64, in fetch
    date = datetime.strptime(date, '%A %d %B %Y').date(),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: *

Relevant Configuration

# waste collection schedule
waste_collection_schedule:
  sources:
    - name: portsmouth_gov_uk
      args:
        uprn: 1775062139
      customize:
        - type: recycling bin
          icon: mdi:recycle
        - type: refuse bin
          icon: mdi:trash-can

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.
@5ila5 5ila5 linked a pull request Nov 22, 2023 that will close this issue
@5ila5
Copy link
Collaborator

5ila5 commented Nov 22, 2023

fixed by #1442
will be part of release 1.44.0 or is available now as master (git) version (HACS: 3-dot menu -> re-download -> change version to master)

@snigehere
Copy link
Author

Many thanks @5ila5 for your fast action which is very much appreciated. Master downloaded and all working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants