DistributionNotFound error when running system-installed pkgme

Bug #893520 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkgme
Fix Released
Critical
Jonathan Lange

Bug Description

$ pkgme
Traceback (most recent call last):
  File "/usr/bin/pkgme", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-subunit

$ dpkg -s pkgme
Package: pkgme
Status: install ok installed
Priority: extra
Section: misc
Installed-Size: 740
Maintainer: pkgme developers <email address hidden>
Architecture: all
Version: 0.1-0~86~oneiric1
Depends: python2.7 | python2.6, python (>= 2.7.1-0ubuntu2), python (<< 2.8), python-argparse, python-cheetah, python-debian, python-fixtures, python-launchpadlib, python-markdown, python-subunit, python-testtools

Related branches

Jonathan Lange (jml)
Changed in pkgme:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
James Westby (james-w) wrote :

What does "dpkg -s python-subunit" say?

Does apt-get install --reinstall python-subunit fix it?

Thanks,

James

Revision history for this message
Jonathan Lange (jml) wrote : Re: [Bug 893520] Re: DistributionNotFound error when running system-installed pkgme

On Tue, Nov 22, 2011 at 2:05 PM, James Westby <email address hidden> wrote:
> What does "dpkg -s python-subunit" say?
>

jml@truth:~/src/pkgme-service/actually-run-pkgme$ dpkg -s python-subunit
Package: python-subunit
Status: install ok installed
Priority: optional
Section: python
Installed-Size: 156
Maintainer: Jelmer Vernooij <email address hidden>
Architecture: all
Source: subunit
Version: 0.0.6+bzr152~ppa102~oneiric1
Provides: python2.6-subunit, python2.7-subunit
Depends: python (>= 2.4), python-central (>= 0.6.11), python-testtools
(>= 0.9.4)
Description: unit testing protocol - Python bindings to generate and
consume Subunit streams
 subunit is a protocol for test activity serialisation deserialisation. This
 permits executing tests remotely, or saving the result of test runs for later
 introspection.
 .
 The python-subunit package includes the Python language bindings.
Homepage: http://code.launchpad.net/subunit
Python-Version: >= 2.4

> Does apt-get install --reinstall python-subunit fix it?
>

No.

jml@truth:~/src/pkgme-service/actually-run-pkgme$ sudo apt-get install
--reinstall python-subunit
[sudo] password for jml:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 25,5 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/testing-cabal/archive/ubuntu/
oneiric/main python-subunit all 0.0.6+bzr152~ppa102~oneiric1 [25,5 kB]
Fetched 25,5 kB in 0s (78,6 kB/s)
(Reading database ... 653313 files and directories currently installed.)
Preparing to replace python-subunit 0.0.6+bzr152~ppa102~oneiric1
(using .../python-subunit_0.0.6+bzr152~ppa102~oneiric1_all.deb) ...
Unpacking replacement python-subunit ...
Setting up python-subunit (0.0.6+bzr152~ppa102~oneiric1) ...
Processing triggers for python-central ...
jml@truth:~/src/pkgme-service/actually-run-pkgme$ pkgme
Traceback (most recent call last):
  File "/usr/bin/pkgme", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672,
in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-subunit

jml

Revision history for this message
James Westby (james-w) wrote :

This is bug 893620 I think.

As well as fixing that, we could move subunit out of the requirements, as it's only
a test dependency.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

I think test_requires is a setuptools thing, but I don't know how it works.

Revision history for this message
Jonathan Lange (jml) wrote :

On Tue, Nov 22, 2011 at 3:10 PM, James Westby <email address hidden> wrote:
> I think test_requires is a setuptools thing, but I don't know how it
> works.
>

FWIW, pkgme uses distribute, a fork of setuptools.

I tried doing the tests_require thing, but it has problems. See
https://code.launchpad.net/~jml/pkgme/subunit-dep-change/+merge/83142

jml

Revision history for this message
James Westby (james-w) wrote :

On Wed, 23 Nov 2011 11:57:00 -0000, Jonathan Lange <email address hidden> wrote:
> On Tue, Nov 22, 2011 at 3:10 PM, James Westby <email address hidden> wrote:
> > I think test_requires is a setuptools thing, but I don't know how it
> > works.
> >
>
> FWIW, pkgme uses distribute, a fork of setuptools.
>
> I tried doing the tests_require thing, but it has problems. See
> https://code.launchpad.net/~jml/pkgme/subunit-dep-change/+merge/83142

We discussed on the phone another approach: dropping subunit as a
dependency as it's not actually a runtime or test dependency, just
needed if you want to use testr (or something else that accepts
subunit.)

That seems like the best option to me currently, and we can add it again
once subunit is fixed and available in that form everywhere
(particularly on whatever environment we are deploying production on.)

Thanks,

James

Revision history for this message
Jonathan Lange (jml) wrote :

OK. Have updated branch to take that option, and will merge. Will only _really_ know if it works once the package has been updated and installed.

Jonathan Lange (jml)
Changed in pkgme:
status: Triaged → Fix Committed
assignee: nobody → Jonathan Lange (jml)
James Westby (james-w)
Changed in pkgme:
status: Fix Committed → Fix Released
milestone: none → 0.2
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.