Package: python-gdata Version: 2.0.18+dfsg-1 Severity: important Tags: patch
Dear Maintainer, Trying to access contacts in python, this error now pops up: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gdata/contacts/service.py", line 104, in GetContactsFeed return self.Get(uri, converter=gdata.contacts.ContactsFeedFromString) File "/usr/lib/python2.7/dist-packages/gdata/service.py", line 1107, in Get 'reason': server_response.reason, 'body': result_body} gdata.service.RequestError: {'status': 301, 'body': '<HTML>\n<HEAD>\n<TITLE>Moved Permanently</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Moved Permanently</H1>\nThe document has moved <A HREF="https://www.google.com/m8/feeds/contacts/default/full?max-results=1000">here</A>.\n</BODY>\n</HTML>\n', 'reason': 'Moved Permanently'} The reason for that appears to be that Google is now forcing HTTPS and has therefore placed a 301 redirect at the original URI, which the script doesn't handle correctly. (See upstream bug report here: https://code.google.com/p/gdata-python-client/issues/detail?id=693 ) -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (650, 'testing'), (600, 'unstable'), (500, 'oldstable') Architecture: i386 (i686) Kernel: Linux 3.11-2-686-pae (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-gdata depends on: ii python 2.7.5-5 ii python-crypto 2.6.1-4 python-gdata recommends no packages. Versions of packages python-gdata suggests: pn python-gdata-doc <none> -- no debconf information
--- python-gdata-2.0.18+dfsg/src/gdata/service.py 2014-05-12 09:19:37.433594330 +0200 +++ python-gdata-2.0.18+dfsg/src/gdata/service.py 2014-05-12 09:20:07.814531042 +0200 @@ -1084,7 +1084,7 @@ return result_body return entry return feed - elif server_response.status == 302: + elif server_response.status == 302 or server_response.status == 301: if redirects_remaining > 0: location = (server_response.getheader('Location') or server_response.getheader('location'))