'unicode' object has no attribute 'get' when calling lp_api.login

Bug #533086 reported by Gordon Tyler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
High
Leonard Richardson
lazr.restfulclient
Fix Released
High
Leonard Richardson

Bug Description

ActivePython 2.6.4.8 (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import bzrlib.plugins.launchpad.lp_api as lp_api
>>> import bzrlib.plugins.launchpad.lp_registration as lp_r
>>> lps = lp_r.LaunchpadService()
>>> lp = lp_api.login(lps)
The authorization page:
   (https://edge.launchpad.net/+authorize-token?oauth_token=XXXXXXXXXX)
should be opening in your browser. After you have authorized
this program to access Launchpad on your behalf you should come
back here and press <Enter> to finish the authentication process.

**pressed enter after authorizing on webpage**

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bzrlib\plugins\launchpad\lp_api.py", line 112, in login
    proxy_info=proxy_info)
  File "C:\Python26\lib\site-packages\launchpadlib-1.5.6-py2.6.egg\launchpadlib\launchpad.py", line 265, in login_with
    max_failed_attempts=max_failed_attempts, version=version)
  File "C:\Python26\lib\site-packages\launchpadlib-1.5.6-py2.6.egg\launchpadlib\launchpad.py", line 187, in get_token_and_login
    version)
  File "C:\Python26\lib\site-packages\launchpadlib-1.5.6-py2.6.egg\launchpadlib\launchpad.py", line 109, in __init__
    credentials, service_root, cache, timeout, proxy_info, version)
  File "C:\Python26\lib\site-packages\lazr.restfulclient-0.9.11-py2.6.egg\lazr\restfulclient\resource.py", line 400, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "C:\Python26\lib\site-packages\lazr.restfulclient-0.9.11-py2.6.egg\lazr\restfulclient\_browser.py", line 280, in get_wadl_application
    url, media_type=wadl_type, extra_headers={'Accept': accept})
  File "C:\Python26\lib\site-packages\lazr.restfulclient-0.9.11-py2.6.egg\lazr\restfulclient\_browser.py", line 253, in _request
    str(url), method=method, body=data, headers=headers)
  File "build\bdist.win32\egg\httplib2\__init__.py", line 1009, in request
AttributeError: 'unicode' object has no attribute 'get'

Bazaar (bzr) 2.2.0dev1
  from bzr checkout C:/dev/bzr/bzr.dev
    revision: 5076
    revid: <email address hidden>
    branch nick: bzr.dev
  Python interpreter: C:\Python26\python.exe 2.6.4
  Python standard library: C:\Python26\lib
  Platform: Windows-post2008Server-6.1.7600
  bzrlib: C:\dev\bzr\bzr.dev\bzrlib
  Bazaar configuration: C:\Users\Owner\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\Owner\Documents\.bzr.log

Plugins:
colo 0.0.2
   Work with colocated branches using current technology.

email
   Sending emails for commits and branch changes.

explorer 1.0.0rc2
   Version Control for Human Beings.

fastimport 0.9.0dev
   FastImport Plugin

launchpad 2.2.0dev1
   Launchpad.net integration plugin for Bazaar.

netrc_credential_store 2.2.0dev1
   Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.2.0dev1
   Merge hook for bzr's NEWS file.

pqm 1.3.0
   Functionality for controlling a Patch Queue Manager (pqm).

qbzr 0.18.3dev
   QBzr - Qt-based frontend for Bazaar

Gordon Tyler (doxxx)
summary: - unicode object has not attribute get when calling lp_api.login
+ 'unicode' object has no attribute 'get' when calling lp_api.login
Revision history for this message
Martin Pool (mbp) wrote :

I'd be inclined to suspect launchpadlib, and to see if you can reproduce this error there.

affects: bzr → launchpadlib
Gary Poster (gary)
Changed in launchpadlib:
status: New → Triaged
importance: Undecided → High
Changed in launchpad-foundations:
assignee: nobody → Leonard Richardson (leonardr)
Changed in launchpadlib:
assignee: nobody → Leonard Richardson (leonardr)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → High
milestone: none → 10.03
affects: launchpadlib → lazr.restfulclient
Changed in lazr.restfulclient:
status: Triaged → Fix Committed
Changed in lazr.restfulclient:
status: Fix Committed → Fix Released
Changed in launchpad-foundations:
status: Triaged → Invalid
Revision history for this message
Gordon Tyler (doxxx) wrote :

Fix confirmed using lazr.restfulclient 0.9.12.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.