-
-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Describe the bug
Jellycon fails to apply serveral features such as keeping track of watched videos or showing the Next Play episode option due to backwards incompatibilities with Kodi versions that still rely on Python 2.7. According to logs, this is caused by methods that annotate attributes with data types, such as the following one in utils.py:
def seconds_to_ticks(seconds:float):To Reproduce
- Install JellyCon v0.9.1+py2
- Let the add-on initialize and wait for the error pop-up in Kodi
- See error in
kodi.log
Expected behavior
Add-on should initialize without errors and playback features like Next Play and Watched track should work as expected.
Logs
2026-03-07 19:50:36.839 T:1736913088 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: invalid syntax (utils.py, line 462)
Traceback (most recent call last):
File "/home/pi/.kodi/addons/plugin.video.jellycon/service.py", line 12, in <module>
from resources.lib.play_utils import Service, PlaybackService, send_progress
File "/home/pi/.kodi/addons/plugin.video.jellycon/resources/lib/play_utils.py", line 19, in <module>
from .jellyfin import api
File "/home/pi/.kodi/addons/plugin.video.jellycon/resources/lib/jellyfin.py", line 11, in <module>
from .utils import get_device_id, get_version, load_user_details
File "/home/pi/.kodi/addons/plugin.video.jellycon/resources/lib/utils.py", line 462
def seconds_to_ticks(seconds:float):
^
SyntaxError: invalid syntax
-->End of Python script error report<--Screenshots
None
System (please complete the following information):
- OS: Raspbian 10 (buster)
- Jellyfin Version: Unknown, remote server
- Kodi Version: 18.7
- Addon Version: 0.9.1+py2
Additional context
According to the repository commit history, this issues seems to have been introduced last year with this commit, where several methods have data types and the typing module is imported (unavailable in Python2):
761dc8e
I can confirm that the issue starts with v0.9.0. Rolling back to 0.8.3 makes the watched episode and the Next Play options work as expected.