Don Hopkins wrote: > The cause of the problem turned out to be some code in setuptools' > pkg_resources module. The NullProvider base class (from which other > providers like the EggProvider inherit) had an __init__ method that was > grabbing the __file__ out of the module into fileName, assuming it was > a path ending with the file name of '__init__.pyc', and calling > os.path.dirname(filename) to get the directory name to import. When the > __file__ did end with '.../__init__.pyc', it worked fine. But that > would mysteriously change after reloads or exceptions! In the cases > where it would crash, the __file__ actually contained just the > DIRECTORY name without a trailing slash, instead of '.../__init__.pyc'.
This is a bug in whatever code set or reset the __file__ attribute, not a pkg_resources bug. __file__ must be a filename or it must not exist. Presumably this is a problem in the code that's reloading the package in question. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

