[PEAK] Exceptions in lazy imported module not reported
Vinj Vinj
vinjvinj at yahoo.com
Sat Dec 23 11:23:00 EST 2006
Sometimes, I get the following exception.
-------------------------
File
"/usr/lib/python2.4/site-packages/Importing-1.9.1-py2.4.egg/peak/util/imports.py",
line 199, in __getattribute__
_loadModule(self)
File
"/usr/lib/python2.4/site-packages/Importing-1.9.1-py2.4.egg/peak/util/imports.py",
line 178, in _loadModule
_loadAndRunHooks(module)
File
"/usr/lib/python2.4/site-packages/Importing-1.9.1-py2.4.egg/peak/util/imports.py",
line 236, in _loadAndRunHooks
reload(module)
ImportError: No module named PriceDB
------------------------
This is usually caused by an exception which is raised
in PriceDB (in the csae above) but the error that gets
reported by the Lazy Importing modile is: "No module
named PriceDB"
I use Lazy Importing extensively and most of my
modules are loaded through it. The startup time of my
app has come down significantly. However, since I'm
running a distributed app where multiple services get
run on different servers, when I get this error, it is
hard to debug.
Is there any way that this error can get reported.
Nice to have feature:
The autocomplete functionality does not work with
IDE's like WINGIDE when you lazy import. It would be
nice to have a script (which given a list of modules)
will replace all occurances of those modules with Lazy
Import loads or replace them back with regular loads.
Thanks,
Vineet
Vineet
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the PEAK
mailing list