Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKC won't start. Error message: "SyntaxError: future feature annotations is not defined" #2006

Open
Sk3tchs opened this issue Dec 5, 2023 · 17 comments

Comments

@Sk3tchs
Copy link

Sk3tchs commented Dec 5, 2023

I get a error as soon as I load Kodi. The issues appeared after I adjusted the time on my NAS, but that my be a coincidence.

log :
kodi.log

May be related to this : pannal/plex-for-kodi#68

@Stern1900
Copy link

I have the same error

@megakroug
Copy link

megakroug commented Dec 9, 2023

same issue too, has anyone a solution ?

Thanks for your help !

@megakroug
Copy link

For not working plugin urllib3 module need to be downgraded (from 2.1.0 to 1.26.16 version: https://mirrors.kodi.tv/addons/nexus/sc ... trix.1.zip).
Try to downgrade myconnpy module from 8.0.33 to 8.0.18 version: https://mirrors.kodi.tv/addons/nexus/sc ... trix.1.zip

I replaced all the contents of the library 1.26.16 with the sudo command in the location /share/CACHEDEV1_DATA/.qpkg/Kodi20/opt/.kodi/addons/script.module.urllib3.

Everything works well !!!

@Stern1900
Copy link

@megakroug Thank you for the detailed description

@simtaj
Copy link

simtaj commented Dec 30, 2023

For me Plexkodiconnect from today not work anymore. How did you solve the problem?

Is Plexkodiconnect dead ?

@simtaj
Copy link

simtaj commented Dec 31, 2023

@megakroug I tried as you suggested, but for me is not working. After plex link it gives me my local server and after choosing addon paths, goes to fine tuning settings page. But this setting page is all grey, so I cannot make any settings and PKC don’t work.

Do you have any suggestion ?
Thank you !

@croneter
Copy link
Owner

I will look into this issue

@croneter
Copy link
Owner

This might be separate issues. Your original issue, @Sk3tchs, stems from this error in the logs:

2023-12-05 10:26:57.165 T:14177   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/Kodi19L/.kodi/addons/plugin.video.plexkodiconnect/service.py", line 4, in <module>
   from resources.lib import service_entry
 File "/opt/Kodi19L/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/service_entry.py", line 10, in <module>
   from . import initialsetup
 File "/opt/Kodi19L/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/initialsetup.py", line 11, in <module>
   from .downloadutils import DownloadUtils as DU, exceptions
 File "/opt/Kodi19L/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/downloadutils.py", line 4, in <module>
   import requests
 File "/opt/Kodi19L/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
   import urllib3
 File "/opt/Kodi19L/.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<--

There is NOTHING I can do about that as PKC is simply importing existing Python packages. The solution is found in comment #2006 (comment) by @megakroug - thanks very much!!

@simtaj: Please share a DEBUG log file as described here, otherwise no-one can help you: https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug

@croneter croneter changed the title Can't connect to Plex PKC won't start. Error message: "SyntaxError: future feature annotations is not defined" Jan 20, 2024
@simtaj
Copy link

simtaj commented Jan 22, 2024

@croneter here is my log. From yesterday changing urllib3 with version 1.26 works no more for me. Any suggestion how can make it work again ?

Thank you for your help!

kodi log.txt

@croneter
Copy link
Owner

On first glance I don't see anything special in your log, @simtaj - what did you do exactly and what was the issue when recording the log file?

@simtaj
Copy link

simtaj commented Jan 22, 2024

When I opened KODI PKC wanted to restart KODI (like a new install). Then give me PLEX code link, accepted it. Then goes trough all questions and when is finished opens PKC settings page. But this page is grey out and PKC not working.
And every time I launch KODI PKC wants to restart and give me code for link again. And like that is again and again…

All that I did when I got debug logging running. Here is picture of PKC settings.

IMG_0405

This problem was before, but I did copy urllib3 1.26 from computer like @megakroug said. And it was working till yesterday. Yesterday power went off and Nvidia Shield with KODI restarted. And from then on I have problem again. But this time copying urllib3 doesnt help. I deleted all KODI cache, but still not working.

All off my auto updates are turned off.

@croneter
Copy link
Owner

Juck, that's bad luck @simtaj . Looks like Kodi and or PKC files got corrupted, that can happen. Try deleting the folder plugin.video.plexkodiconnect in the directory addon-data in your Kodi user data folder when Kodi is not running

@simtaj
Copy link

simtaj commented Jan 22, 2024

@croneter I did now as you said deleted folder plugin.video.plexkodiconnect but it didn’t help. All the same greyout settings.

Strange is, that it was like that same problem end of december. And copying urllib3 1.26 and clearing cache did help. Now problem come back and nothing helps….Does PKC with urllib3 2.1.0 works by you or you have to have version 1.26 too ?
Do you think that deleting KODI and clean install is the only solution ?

@croneter
Copy link
Owner

Thing is, PKC does not render the settings, that's Kodi itself. In your place I'd make a backup, then indeed try again from scratch with a completely fresh Kodi instance

@simtaj
Copy link

simtaj commented Jan 22, 2024

Will try tonight from scratch. Do I leave urllib3 on version 2.1.0., when I install clean KODI and before installing PKC ?

@simtaj
Copy link

simtaj commented Jan 22, 2024

@croneter thank you for you help !! Clean install did the trick.
I made now full backup of KODI and addon data ;). Fingers crossed it lasts.

@Stern1900
Copy link

Stern1900 commented Jan 26, 2024

I was sitting on my sofa thinking about why PKC is now using a different Python library than my KODI on my QNAP NAS.
A quick test under Windows shows me that both programs work. So it's because of the KODI version installed on the QNAP. Officially QNAP does not support Kodi anymore.
So what to do:
I have disabled the update in KODI under Addons.
Then installed PKC 3.8.1.
Copy the fileshttps://mirrors.kodi.tv/addons/nexus/sc ... trix.1.zip) and https://mirrors.kodi.tv/addons/nexus/sc ... trix.1.zip to share/CACHEDEV1_DATA/.qpkg/Kodi20/opt/.kodi/addons/ and everything works as usual. Sorry for my bad english

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants