Linux Upgraded Python, Now All Scripts Fail
#1
Hello all, I upgraded Python from 2.7.6 to 2.7.9 by building and installing from source. Now all scripts in Kodi fail. How do I get them to work with the new version of Python?

EDIT: Example of failure from the log

Code:
09:08:56 T:139688627132160   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IOError'>
                                            Error Contents: [Errno url error] unknown url type: 'https'
                                            Traceback (most recent call last):
                                              File "/home/xbmc/.kodi/addons/plugin.program.addoninstaller/default.py", line 454, in <module>
                                                elif mode=='addoninstall':         ADDONINSTALL(name,url,description,filetype,repourl)            # Installing Addon(s)
                                              File "/home/xbmc/.kodi/addons/plugin.program.addoninstaller/default.py", line 322, in ADDONINSTALL
                                                downloader.download(url,lib,dp)
                                              File "/home/xbmc/.kodi/addons/plugin.program.addoninstaller/downloader.py", line 9, in download
                                                urllib.urlretrieve(url,dest,lambda nb, bs, fs, url=url: _pbhook(nb,bs,fs,url,dp))
                                              File "/usr/local/lib/python2.7/urllib.py", line 98, in urlretrieve
                                                return opener.retrieve(url, filename, reporthook, data)
                                              File "/usr/local/lib/python2.7/urllib.py", line 245, in retrieve
                                                fp = self.open(url, data)
                                              File "/usr/local/lib/python2.7/urllib.py", line 210, in open
                                                return self.open_unknown(fullurl, data)
                                              File "/usr/local/lib/python2.7/urllib.py", line 222, in open_unknown
                                                raise IOError, ('url error', 'unknown url type', type)
                                            IOError: [Errno url error] unknown url type: 'https'
                                            -->End of Python script error report<--
Reply
#2
IOError: [Errno url error] unknown url type: 'https'

seems you built python without TLS support
Reply
#3
(2015-07-15, 17:25)wsnipex Wrote: IOError: [Errno url error] unknown url type: 'https'

seems you built python without TLS support

That seems odd, I run lots of other python scripts on this same computer outside of Kodi and they use TLS with no problems.

I will try to rebuild it, thanks for the pointer! I'll report back whichever way it goes.
Reply
#4
I'm getting a similar error on Ubuntu x64 installed from apt. Python urllib2 is choking on https urls.
http://pastebin.com/QVkyVTYR
Shows the error from trying to sign in (first time) to Youtube app or selecting a search option, or any app that depends on youtube. It also happens on startup from the Dropbox app with congruent backtrace.
kodi --version reports 15.0 Git:2f34a0c Media Center Kodi
uname -a reports Linux zakri-golem 3.16.0-44-generic #59-Ubuntu SMP Tue Jul 7 02:07:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
glxinfo report is here http://pastebin.com/naMDm0n2
email me if you need more.
Reply
#5
I'm noticing that these are both the developer versions of python. Is your cpp port checking if dev version is installed? https is the protocol, the string isn't being encoded to an URL properly, should use an URL object not a hacked together string. Somewhere there's an extra quote or the ilke in the cpp source code.
Reply

Logout Mark Read Team Forum Stats Members Help
Upgraded Python, Now All Scripts Fail0