Closed pereiraru closed 5 years ago
I apologize, but this slipped under my radar. Is this still an issue for you? What system is HA installed on?
Issue persists for me.. Changed PMS from WinSer2k12 to Debian.
Reports OverflowError: timestamp out of range for platform time_t`
Can parse XML just fine.
Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 365, in _async_add_entity await entity.async_update_ha_state() File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state self._async_write_ha_state() File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state device_attr = self.device_state_attributes File "/config/custom_components/plex_recently_added/sensor.py", line 117, in device_state_attributes media['addedAt']).strftime('%Y-%m-%dT%H:%M:%SZ') OverflowError: timestamp out of range for platform time_t
resolved: was not due to your code or OS, had to do a plex-dance.
@nayaj what did you do to fix it?
same issue would love to know the resolution?
@nayaj I have the same issue. How do you fix it?
I messaged nayaj over on the HA forums. He had this issue over a year ago, but from what he remembers:
"some objects on my Plex server where bugged and had weird time stamps. I moved my entire directory, did a full sync and clean, moved them all back and did a full clean and sync again."
Describe the Bug After adding the component, the same doesn´t load, showing the message below.
The Error error in homeassistant:
` Log Details (ERROR) Fri Jan 18 2019 09:16:41 GMT+0000 (Western European Standard Time)
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 240, in async_update_ha_state device_attr = self.device_state_attributes File "/config/custom_components/sensor/plex_recently_added.py", line 117, in device_state_attributes media['addedAt']).strftime('%Y-%m-%dT%H:%M:%SZ') OverflowError: timestamp out of range for platform time_t`
xml from plex with a movie example with the reference to addedAt đź‘Ť
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Movies" librarySectionUUID="a1370d9f-5f27-4e38-84e1-5a13de91bad8" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1547506704"> <Video ratingKey="2265" key="/library/metadata/2265" guid="com.plexapp.agents.imdb://tt1517451?lang=en" librarySectionTitle="Movies" librarySectionID="1" librarySectionKey="/library/sections/1" studio="Malpaso Productions" type="movie" title="A Star Is Born" titleSort="Star Is Born" contentRating="R" summary="Seasoned musician Jackson Maine discovers—and falls in love with—struggling artist Ally. She has just about given up on her dream to make it big as a singer—until Jack coaxes her into the spotlight. But even as Ally's career takes off, the personal side of their relationship is breaking down, as Jack fights an ongoing battle with his own internal demons." rating="9.0" audienceRating="8.1" viewCount="1" lastViewedAt="1547251882" year="2018" thumb="/library/metadata/2265/thumb/1546965466" art="/library/metadata/2265/art/1546965466" duration="8143933" originallyAvailableAt="2018-10-03" **addedAt="1546965437"** updatedAt="1546965466"
Indicate if you followed all steps in the troubleshooting doc yes, and able to retrieve xml
http://pereixxxxx.xxx:32400/library/recentlyAdded?X-Plex-Token=MXhxxxxxxxxxxDgo1eZ
What data does the sensor display if any? shows nothing, is not loaded.
What displays when visiting the API URL from the troubleshooting guide? Feel free to censor information pertaining to titles, networks, etc.
Does the default Home Assistant Plex component work for you? This is important to know, helps rule out issues with your Plex installation.
Home Assistant Version What version of HA are you running?
Additional Context Add any other context about the problem here.