Home-Assistant-Mail-And-Packages: Sensors failing during setup (again)

I’m getting this error again on the latest beta:

Logger: custom_components.mail_and_packages
Source: custom_components/mail_and_packages/helpers.py:971
Integration: Mail and Packages (documentation, issues)
First occurred: 3:58:24 PM (1 occurrences)
Last logged: 3:58:24 PM

Unexpected error fetching Mail and Packages (mail.1008n3rd.com) data: unconverted data remains: ,
Traceback (most recent call last):
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 151, in async_refresh
    self.data = await self._async_update_data()
  File "/Users/homeassistant/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 139, in _async_update_data
    return await self.update_method()
  File "/Users/homeassistant/.homeassistant/custom_components/mail_and_packages/__init__.py", line 78, in async_update_data
    return await hass.async_add_executor_job(process_emails, hass, config)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/homeassistant/.homeassistant/custom_components/mail_and_packages/helpers.py", line 128, in process_emails
    fetch(hass, config, account, data, sensor)
  File "/Users/homeassistant/.homeassistant/custom_components/mail_and_packages/helpers.py", line 229, in fetch
    count[sensor] = get_items(account, const.ATTR_COUNT, amazon_fwds)
  File "/Users/homeassistant/.homeassistant/custom_components/mail_and_packages/helpers.py", line 971, in get_items
    dateobj = datetime.datetime.strptime(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: ,

_Originally posted by @julianrinaldi in https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues/362#issuecomment-789213093_

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24

Most upvoted comments

Nevermind, I restarted and it started working again.

Hi xxx, your package will arrive:

Tuesday, March 2, 5 p.m. – 10 p.m.