This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jwheare
Recipients jwheare
Date 2009-02-14.12:36:01
SpamBayes Score 4.46471e-08
Marked as misclassified No
Message-id <1234614964.94.0.514404315884.issue5258@psf.upfronthosting.co.za>
In-reply-to
Content
As described here: http://james.wheare.org/notes/2009/02/import-site-
failed-use-v-for-traceback.php

The addpackage function will result in a TypeError being raised from os.path.exists(dir) -> from os.stat(path) if the contents of an 
inspected .pth file contain binary data.

This can happen in OS X network environments where ._ AppleDouble files 
are created to store resource forks and file metadata.

As this function is run whenever the interpreter is initialised, Python 
should be robust enough to ignore invalid data in these files, either by 
catching the TypeError in os.path.exists, or by detecting them at a 
higher level, but should be careful of false positives.

Another alternative is to raise a different exception and use it to 
display more helpful debugging info for those not familiar with pdb.
History
Date User Action Args
2009-02-14 12:36:05jwhearesetrecipients: + jwheare
2009-02-14 12:36:04jwhearesetmessageid: <1234614964.94.0.514404315884.issue5258@psf.upfronthosting.co.za>
2009-02-14 12:36:02jwhearelinkissue5258 messages
2009-02-14 12:36:01jwhearecreate