retrospect-addon / plugin.video.retrospect

Retrospect is a Kodi video add-on which allows you to watch streams of a number of free and publicly available online TV stream sites.
https://www.rieter.net/content/
GNU General Public License v3.0
110 stars 36 forks source link

pytz.exceptions.UnknownTimeZoneError: 'Europe/Amsterdam' when trying to open NPO start #1602

Closed bammerlaan closed 2 years ago

bammerlaan commented 2 years ago

Bug report

Describe the bug

I'm not sure if this is a bug in Retrospect, but you might be able to point me in the direction of where the issue lies: whenever I try to open NPO start in Retrospect, it gets stuck loading. The Kodi log gives the following error:

2022-01-18 01:48:49.576 T:5210     INFO <general>: Python interpreter stopped
2022-01-18 01:48:51.135 T:5214     INFO <general>: initializing python engine.
2022-01-18 01:48:51.239 T:5214     INFO <general>: Retrospect :: Additional logging can be found in '/home/steelbas/.kodi/userdata/addon_data/plugin.video.retrospect/retrospect.log'
2022-01-18 01:48:51.335 T:5214    FATAL <general>: Traceback (most recent call last):
                                                     File "/home/steelbas/.kodi/addons/plugin.video.retrospect/resources/lib/channelinfo.py", line 97, in get_channel
                                                       channel = eval(channel_command)
                                                     File "<string>", line 1, in <module>
                                                     File "/home/steelbas/.kodi/addons/plugin.video.retrospect/channels/channel.nos/nos2010/chn_nos2010.py", line 190, in __init__
                                                       self.__timezone = pytz.timezone("Europe/Amsterdam")
                                                     File "/home/steelbas/.kodi/addons/script.module.pytz/lib/pytz/__init__.py", line 188, in timezone
                                                       raise UnknownTimeZoneError(zone)
                                                   pytz.exceptions.UnknownTimeZoneError: 'Europe/Amsterdam'

2022-01-18 01:48:51.335 T:5214     INFO <general>: CPythonInvoker(38, /home/steelbas/.kodi/addons/plugin.video.retrospect/retroaddon.py): script successfully run

The Retrospect log has the following:

20220118 01:48:51 - [INFO    ] - plugin.py            - 34   - *********** Starting Retrospect add-on version 5.5.2 ***********
20220118 01:48:51 - [INFO    ] - addonsettings.py     - 396  - Setting GUI language to: en
20220118 01:48:51 - [INFO    ] - chn_class.py         - 45   - Initializing channel (__init__): NPO Start (uzgjson) [channel.nos.nos2010.uzgjson=False, nl=False, National, ED8FDB9C-3870-11E2-B1C2-192A6288709B] (Order: #_nl.0001)
20220118 01:48:51 - [INFO    ] - chn_nos2010.py       - 1441 - Setting the Cookie-Consent cookie for www.uitzendinggemist.nl
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - Cannot Create channel for NPO Start (uzgjson) [channel.nos.nos2010.uzgjson=False, nl=False, National, ED8FDB9C-3870-11E2-B1C2-192A6288709B] (Order: #_nl.0001)
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - | Traceback (most recent call last):
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |   File "/home/steelbas/.kodi/addons/plugin.video.retrospect/resources/lib/channelinfo.py", line 97, in get_channel
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |     channel = eval(channel_command)
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |   File "<string>", line 1, in <module>
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |   File "/home/steelbas/.kodi/addons/plugin.video.retrospect/channels/channel.nos/nos2010/chn_nos2010.py", line 190, in __init__
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |     self.__timezone = pytz.timezone("Europe/Amsterdam")
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |   File "/home/steelbas/.kodi/addons/script.module.pytz/lib/pytz/__init__.py", line 188, in timezone
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - |     raise UnknownTimeZoneError(zone)
20220118 01:48:51 - [ERROR   ] - channelinfo.py       - 99   - + pytz.exceptions.UnknownTimeZoneError: 'Europe/Amsterdam'
20220118 01:48:51 - [CRITICAL] - plugin.py            - 98   - None or more than one channels were found, unable to continue.
20220118 01:48:51 - [INFO    ] - addon.py             - 65   - Retrospect :: Flushing and closing logfile.

I have also been having trouble with a recent Python update to Python 3.10, perhaps that is related? See here.

I have tried Googling for Kodi / Arch Linux errors relating to pytz and time zone errors, but I can't really find anything. "Europe/Amsterdam" seems like it should work, to me.

Expected Behavior

I would expect NPO start channels to be listed

Actual Behavior

A loading screen shows and never stops loading until I press back.

Possible Fix

To Reproduce

Steps to reproduce the behavior:

Debuglog

The debug retrospect.log can be found here: http://paste.kodi.tv/tabipirade

Screenshots

Additional context or screenshots (if appropriate)

Your Environment

Used Operating system:

Used versions:

basrieter commented 2 years ago

Can you run timedatectl list-timezones | grep Europe on the console of that machine?

bammerlaan commented 2 years ago

Yes:


[:~] $ timedatectl list-timezones | grep Europe
Europe/Amsterdam
Europe/Andorra
Europe/Astrakhan
Europe/Athens
Europe/Belfast
Europe/Belgrade
Europe/Berlin
Europe/Bratislava
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Busingen
Europe/Chisinau
Europe/Copenhagen
Europe/Dublin
Europe/Gibraltar
Europe/Guernsey
Europe/Helsinki
Europe/Isle_of_Man
Europe/Istanbul
Europe/Jersey
Europe/Kaliningrad
Europe/Kiev
Europe/Kirov
Europe/Lisbon
Europe/Ljubljana
Europe/London
Europe/Luxembourg
Europe/Madrid
Europe/Malta
Europe/Mariehamn
Europe/Minsk
Europe/Monaco
Europe/Moscow
Europe/Nicosia
Europe/Oslo
Europe/Paris
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/Samara
Europe/San_Marino
Europe/Sarajevo
Europe/Saratov
Europe/Simferopol
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tirane
Europe/Tiraspol
Europe/Ulyanovsk
Europe/Uzhgorod
Europe/Vaduz
Europe/Vatican
Europe/Vienna
Europe/Vilnius
Europe/Volgograd
Europe/Warsaw
Europe/Zagreb
Europe/Zaporozhye
Europe/Zurich
ronie commented 2 years ago

perhaps the script module wasn't installed correctly... could you check if there's an 'Amsterdam' file in the '/home/steelbas/.kodi/addons/script.module.pytz/lib/pytz/zoneinfo/Europe/' folder?

bammerlaan commented 2 years ago

There is, I was unable to read its contents, however, presumably because it's in binary. Not sure if it's of help, but I added the file as an attachment to this reply. Amsterdam.zip

I tried reinstalling both Pytz and Retrospect just now, but that resulted in the same error in the logs. I reuploaded that log in case you see more than I do: http://paste.kodi.tv/evevanetoq

basrieter commented 2 years ago

Might be the Python version. Is there an option to upgrade to the latest 3.10.2?

bammerlaan commented 2 years ago

Hmm... Well, yes, I could enable the Arch testing repository, as it's in there, but honestly I'd rather wait a few days until it gets to the regular repositories to keep my system (relatively) stable. I'll report back when it gets there!

bammerlaan commented 2 years ago

Good news, the Python update landed and it indeed fixes the problem! Sorry for taking up your time with what turns out was not your issue.

basrieter commented 2 years ago

No problem. Good to hear that everything is working again.