Plainbox crashes at start 'requests-oauth missing'

Bug #1598741 reported by Maciej Kisielewski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PlainBox (Toolkit)
Fix Released
Critical
Maciej Kisielewski

Bug Description

I get following traceback [1] while trying to do anything involving plainbox, like running $ plainbox.

Steps to reproduce / what I did:
1. set up clean VM
2. get lp:checkbox
3. $ ./mk-venv
4. $ . venv/bin/activate
5. $ plainbox

[1]
Traceback (most recent call last):
  File "/home/kissiel/checkbox/venv/bin/plainbox", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests-oauthlib' distribution was not found and is required by plainbox

Related branches

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

We've made the necessary changes in the transport.py code to have a conditional import of oauthlib:

# OAuth is not always available on all platforms.
_oauth_available = True
try:
    from oauthlib import oauth1
except ImportError:
    _oauth_available = False

Jonathan did have the same issue with a snap built using plainbox from pypi. So to me the content of plainbox.py is the opposite of what we have in the code where requests-oauth is mandatory (it should not).

Now maybe there's an issue with requests-oauthlib on pypi but I'd stop depending on it, it's not a strict dependency of plainbox. projects requiring the OAuthTransport already pull the right set of dependencies (i.e the pilot project).

Changed in plainbox:
status: Confirmed → In Progress
assignee: nobody → Maciej Kisielewski (kissiel)
Changed in plainbox:
milestone: none → 0.31
status: In Progress → Fix Committed
Pierre Equoy (pieq)
Changed in plainbox:
status: Fix Committed → Fix Released
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.