#1804 closed defect (fixed)

poor error reporting when a dependency can't be imported: Warning: version number None found for dependency 'pyopenssl' (imported from None) could not be parsed.

Reported by: davidsarah Owned by: davidsarah
Priority: minor Milestone: 1.10.0
Component: code Version: 1.9.2
Keywords: packaging error Cc:
Launchpad Bug:

Description

The message from the import exception is preserved and printed, which is good, but the reference to a version number of None is spurious. The code that prints this message is in src/allmydata/__init__.py.

Change History (4)

comment:1 Changed at 2012-09-14T02:16:04Z by david-sarah@…

  • Resolution set to fixed
  • Status changed from new to closed

In 36c176224d1ebacf:

(The changeset message doesn't reference this ticket)

comment:2 Changed at 2012-09-14T02:20:51Z by davidsarah

  • Keywords review-needed added
  • Milestone changed from soon to 1.10.0

The user who brought this to my attention confirmed that this fixes the error report:

Warning: dependency 'pyopenssl' could not be imported. pkg_resources thought it should be possible to import version '0.11' from '/home/jonathan/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/pyOpenSSL-0.11-py2.6-linux-i686.egg'.
The exception trace was (<type 'exceptions.ImportError'>, 'libssl.so.0.9.8: cannot open shared object file: No such file or directory', ('/home/jonathan/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/pyOpenSSL-0.11-py2.6-linux-i686.egg/OpenSSL/__init__.py', 40, '<module>', 'from OpenSSL import crypto')).

and I also checked that it doesn't break a normal installation.

Post-commit review of 36c176224d1ebacf would be useful.

comment:3 Changed at 2012-09-14T03:17:15Z by zooko

  • Keywords review-needed removed

Reviewed 36c176224d1ebacf. Looks good to me!

comment:4 Changed at 2012-09-17T03:32:36Z by david-sarah <david-sarah@…>

In 36c176224d1ebacf:

src/allmydata/init.py: ensure that if a dependency cannot be imported, we will report that rather than reporting a confusing message about the version and location being None. fixes #1804

Note: See TracTickets for help on using tickets.