New submission from James Wheare <ja...@wheare.org>: 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. ---------- messages: 82032 nosy: jwheare severity: normal status: open title: addpackage in site.py fails hard on badly formed .pth files type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5258> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com