croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.16k stars 77 forks source link

PlexKodiConnect error: "SyntaxError: future feature annotations is not defined" #2019

Closed Stern1900 closed 8 months ago

Stern1900 commented 8 months ago

And again i have a PlexKodi error. kodi.logAnd no idea what the problem is

croneter commented 8 months ago

Your issue is this:

2024-01-25 15:29:50.406 T:30282   error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'SyntaxError'>
                                                   Error Contents: future feature annotations is not defined (__init__.py, line 5)
                                                   Traceback (most recent call last):
                                                     File "/opt/Kodi20/.kodi/addons/plugin.video.plexkodiconnect/service.py", line 4, in <module>
                                                       from resources.lib import service_entry
                                                     File "/opt/Kodi20/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/service_entry.py", line 10, in <module>
                                                       from . import initialsetup
                                                     File "/opt/Kodi20/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/initialsetup.py", line 11, in <module>
                                                       from .downloadutils import DownloadUtils as DU, exceptions
                                                     File "/opt/Kodi20/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/downloadutils.py", line 4, in <module>
                                                       import requests
                                                     File "/opt/Kodi20/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
                                                       import urllib3
                                                     File "/opt/Kodi20/.kodi/addons/script.module.urllib3/lib/urllib3/__init__.py", line 5
                                                       from __future__ import annotations
                                                                                        ^
                                                   SyntaxError: future feature annotations is not defined
                                                   -->End of Python script error report<--
croneter commented 8 months ago

This was reported in issue #2006 before. Unfortunately, it's an issue with different Python version - NOTHING PKC can do anything about, you need to fix it yourself (or hopefully Kodi fixes this in the future).

The solution is described in https://github.com/croneter/PlexKodiConnect/issues/2006#issuecomment-1850540514. Please follow the steps detailed there