Message105988
ImportError messages should quote the name it cannot import since the actual problem may be whitespace in the name that is currently invisible in the message. In other words, display
ImportError: no module named 'bad name\r'
instead of
ImportError: no module named bad name
This defect lead to the current python-list thread
pickle unable to load collection
Peter Otten figured out that it was unable to load 'collections\r' rather than 'collections', which he demonstrated with
>>> >>> try: pickle.loads(garbled_data)
... except ImportError as e:
... e
...
ImportError('No module named collections\r',)
The OP used 2.6, I tested 3.1, hence presume, after searching tracker issues, that this applies to 2.7 and 3.2 as well.
I marked this as a bug since the current message is wrong and misleading. I suspect the same may be true of a few other error messages, but I cannot think of any at the moment. |
|
Date |
User |
Action |
Args |
2010-05-18 17:03:20 | terry.reedy | set | recipients:
+ terry.reedy |
2010-05-18 17:03:20 | terry.reedy | set | messageid: <1274202200.16.0.392487565261.issue8754@psf.upfronthosting.co.za> |
2010-05-18 17:03:18 | terry.reedy | link | issue8754 messages |
2010-05-18 17:03:17 | terry.reedy | create | |
|