Kodi Community Forum

Full Version: Sonething has changes in requests/urllib3 (using profiles other than master only?!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok strange one.

I recently noticed an error with my addon (Oz Weather) that only happens when using profiles other than the master profile.  Also the Trakt v3 addon exhibits this, so it's not just my addon.

I have noticed this only recently - last couple of months at most.  So something has changed.

The error is:
20:10:36.573 T:139711338968832   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named urllib3
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/weather.ozweather/default.py", line 35, in <module>
                                                from weatherzone import *
                                              File "/storage/.kodi/addons/weather.ozweather/resources/lib/weatherzone.py", line 19, in <module>
                                                import requests
                                              File "/storage/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 43, in <module>
                                                import urllib3
                                            ImportError: No module named urllib3
                                            -->End of Python script error report<--

I thought urllib3 came via my addon.xml using:
<import addon="script.module.requests" version="2.0.0"/>

which in turn import urllib3:
<import addon="script.module.urllib3" version="1.22"/>

...what I am wondering about is
  • Why this addon still works just fine for the Master profile, with no error, but raises the error above with any secondary profile (tried on both Windows and LibreElec).
  • When/why did this change happen, and where should I have been looking to be forewarned about this?
  • How can I fix it to start working again in sub-profiles as well?

...Many thanks for your help!
In case it is useful - there's a full debug log here: https://justpaste.it/1df0q
the requests module was updated on nov 6, the new version of requests has a dependency on urllib3. the previous version didn't have that.

perhaps check if the urllib3 module is enabled when you're logged in using a (non-master) profile?
@ronie - thanks, I will check that tonight.  I still use Confluence and that doesn't have the same 'libs' bit in the addon settings area so I forgot about that possibility.
@ronie - confirmed, that was the issue.  On 3 separate machines...  Martijn seems on this, seems like a bug - new depencies are installed, but in a disabled state...which causes those addons to crash, and without any kinda useful/graceful message.  I'll leave it to you smarter folks to work out how to fix that, but many thanks for your help!