Login with a consumer_name and the default authorization engine errors out

Bug #1960010 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
Triaged
Low
Unassigned

Bug Description

Using launchpadlib 1.10.16

>>> lp.login_with(service_root='production', version='devel', consumer_name='try')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 543, in login_with
    authorization_engine = cls.authorization_engine_factory(
  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in authorization_engine_factory
    return AuthorizeRequestTokenWithBrowser(*args)
  File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 735, in __init__
    super(AuthorizeRequestTokenWithBrowser, self).__init__(
  File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 532, in __init__
    raise ValueError(
ValueError: You must provide either application_name or consumer_name.

Colin pointed out that the AuthorizeRequestTokenWithBrowser constructor specifically discards consumer_name, one workaround is to specify authorization_engine=AuthorizeRequestTokenWithURL('production', consumer_name='try')

Jürgen Gmach (jugmac00)
Changed in launchpadlib:
status: New → Triaged
importance: Undecided → Low
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.