Open Selim042 opened 1 year ago
should be fixed now
I updated to 3.7.0, same issue.
Same issue also on 3.8.0.
@ljmerza Any updates on this?
ill need more info like what tracking sites are being parsed
What is the best way to determine what is being parsed that is causing issues? I don't really delete emails, so there are lots of options.
updated to 3.9.0 to add more debug logging for you to track this down
Sorry about the delay, looks like Georgia Power? There is lots more data from before this in the log as well, just put a few lines from before the error. I didn't see any other errors from you. Is there a way to pinpoint exactly what email did it from them? They did recently change their formatting some.
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] []
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] parsing tracking numbers for luzernsolutions
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] []
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] parsing tracking numbers for google.com
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] []
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] parsing tracking numbers for wdc.com
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] []
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] parsing tracking numbers for monoprice.com
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] []
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] parsing tracking numbers for southernco.com
2023-06-13 14:31:34.221 DEBUG (SyncWorker_4) [custom_components.email.sensor] find_carrier email_domain: southernco.com
2023-06-13 14:31:34.222 ERROR (MainThread) [homeassistant.components.sensor] email: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 537, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/email/sensor.py", line 332, in update
self._attr[ATTR_TRACKING_NUMBERS][ATTR] = list(map(lambda x: find_carrier(x, EMAIL_DOMAIN), tracking_numbers))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/email/sensor.py", line 332, in <lambda>
self._attr[ATTR_TRACKING_NUMBERS][ATTR] = list(map(lambda x: find_carrier(x, EMAIL_DOMAIN), tracking_numbers))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/email/sensor.py", line 168, in find_carrier
'tracking_number': tracking_number['tracking_number'],
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'tracking_number'
Semi-related question. As I don't really delete emails, will old emails with formatting that no longer matches cause issues? Or does it only parse recent emails?
should be fixed in 3.10.0
Not sure if it is related, but Southern Power is now getting this in the attributes. But an entity is published, so that's a huge improvement.
georgia_power:
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
- tracking_number: ''
carrier: southernco.com
origin: southernco.com
link: ''
Version of the custom_component
3.6.0
Configuration
Describe the bug
After configuring the integration and restarting it doesn't create the entities and has this error in the logs. I tried setting this up in December and kept running into issues, and it went on the back burner for a while.
Debug log