Home-Assistant-Mail-And-Packages: ISSUE: Problem decoding email message: Expected list, got
Describe the bug None of my Amazon packages are properly parsed. With debug logging I get the same error for every message found in the search
Environment (please complete the following information):
- OS: HassOS
- Type of device: Proxmox
- Home Assistant version: latest
- Component version: latest
Logs
2024-11-21 22:57:37.802 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Amazon Subject: Your Amazon.com order of "***REDACTED FOR GITHUB***.." has shipped!
2024-11-21 22:57:37.802 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Problem decoding email message: Expected list, got <class 'str'>
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Email Multipart: False
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Content Type: text/html
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Amazon Subject: Now arriving today: Your Amazon package will be delivered today.
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Problem decoding email message: Expected list, got <class 'str'>
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] Amazon email search address: order-update@amazon.com
2024-11-21 22:57:37.806 DEBUG (SyncWorker_28) [custom_components.mail_and_packages.helpers] DEBUG subject: None
Additional Context
I also have USPS, UPS, and FedEx enabled and all of those work perfectly fine. This appears to be something specific to Amazon.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27
There aren’t any packages out for delivery yet. I’ll let you know
Nice work. No error this time and the amazon sensor rightfully says “0.” I’ll order something soon and I’ll let you know if it updates. Thanks
Try replacing the helpers.py in custom_components/mail_and_packages with this file:
https://raw.githubusercontent.com/firstof9/Home-Assistant-Mail-And-Packages/refs/heads/fix-1015/custom_components/mail_and_packages/helpers.py
Then restart HA and see if the errors go away and it starts working correctly.