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. #1804

Closed
opened 2012-09-14 00:26:37 +00:00 by davidsarah · 4 comments
davidsarah commented 2012-09-14 00:26:37 +00:00
Owner

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 source:src/allmydata/init.py.

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 source:src/allmydata/*init*.py.
tahoe-lafs added the
code
minor
defect
1.9.2
labels 2012-09-14 00:26:37 +00:00
tahoe-lafs added this to the soon milestone 2012-09-14 00:26:37 +00:00
david-sarah@jacaranda.org commented 2012-09-14 02:16:04 +00:00
Author
Owner

In changeset: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
In changeset: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 ```
tahoe-lafs added the
fixed
label 2012-09-14 02:16:04 +00:00
davidsarah commented 2012-09-14 02:20:51 +00:00
Author
Owner

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 changeset:36c176224d1ebacf would be useful.

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 changeset:36c176224d1ebacf would be useful.
tahoe-lafs modified the milestone from soon to 1.10.0 2012-09-14 02:20:51 +00:00

Reviewed changeset:36c176224d1ebacf. Looks good to me!

Reviewed changeset:36c176224d1ebacf. Looks good to me!
david-sarah <david-sarah@jacaranda.org> commented 2012-09-17 03:32:36 +00:00
Author
Owner

In changeset: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
In changeset: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 ```
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1804
No description provided.