valentin-gosselin / lastfm-scrobbler-ha-integration

An Home Assistant integration scrobble to last.fm
16 stars 3 forks source link

TZInfo Error in logs #1

Closed davidlamkin closed 1 year ago

davidlamkin commented 1 year ago

Hi! First of all, thank you for your hard work. I was going to try to write something like this myself. My issue is that I'm getting this error (flooding) in my logs:

2023-10-12 09:55:38.585 ERROR (SyncWorker_12) [custom_components.lastfm_scrobbler.media_player] Error parsing date: 'float' object has no attribute 'tzinfo'

My setup is: Home Assistant: Docker container - homeassistant/home-assistant Media Player (Music Assistant): Docker container - ghcr.io/music-assistant/server

It is scrobbling but it looks like it's not able to do it at 25% of play. So, if this can't be fixed - it's ok because it works. Any insight you can give me would be great. Thanks again!

valentin-gosselin commented 1 year ago

I'm a little bit busy this weekend. I will try to fix it on Monday

valentin-gosselin commented 1 year ago

Hello,

Thank you for bringing this to my attention and for your kind words. I believe I've addressed the issue you've encountered in the latest update (version 1.1.1). I've improved the error handling in the calculate_current_position method to manage different data types and values for last_updated_at, which seems to be the root cause of the error you're experiencing.

I've also enhanced the logging to provide more insightful information for debugging. This update should also ensure the scrobbling happens accurately at 25% of play as per your configuration.

Please update to version 1.1.1 and let me know if the issue persists or if you encounter any other problems. Your feedback is invaluable in improving this integration, and I appreciate your patience and support.

Looking forward to your feedback.

Best regards,

Valentin Gosselin

davidlamkin commented 1 year ago

Thank you much for the quick action. I will be able to install and test the new version tomorrow.

davidlamkin commented 1 year ago

Thanks for your hard work! It is much appreciated.