Hi, I get this error trying to login:
http://pastebin.com/cMUk8EJU
I tried to figure out what's happening there, and here's the traceback:
Code:
Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/plugin.video.youtube/YouTubeCore.py", line 467, in _fetchPage
con = urllib2.urlopen(request)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 0] Error>
That line in urllib2.py goes:
Code:
except socket.error, err: # XXX what error?
h.close()
raise URLError(err)
So it's a socket error with errno 0... Really helpful.
Now this part is really baffling: I tried to reproduce the error manually:
Code:
>>> from urllib2 import Request, urlopen
>>> r = Request('https://accounts.google.com/ServiceLogin?uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26feature%3Dheader%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252F&hl=en_US<mpl=sso')
>>> r.add_header('Referer', 'http://www.youtube.com/')
>>> r.add_header('Cookie', 'PREF=f1=50000000&hl=en;')
>>> r.add_header('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8')
>>> c=urlopen(r)
>>> c
<addinfourl at 3069986412L whose fp = <socket._fileobject object at 0xb6fa78ec>>
>>> c.info()
<httplib.HTTPMessage instance at 0xb6fc464c>
>>> c.read()
'... etc.'
It works. On the same machine, same python interpreter, even same user, that code works just fine. But under xbmc it fails. It's absolutely mystifying.
This started recently, with no reason whatsoever as far as I can tell. Maybe someone has a better idea than me what might be wrong.