[PEAK] Question regarding lazyModule
Vineet Jain
vinjvinj at yahoo.com
Mon Jun 19 01:31:21 EDT 2006
I've migrated my application to use lazy module and it has been working
well. I'm trying to figure out why the matplotlib (distributed as an
egg) gets imported when I do:
from peak.util.imports import lazyModule
Traceback (most recent call last):
File "StartScanDaemon.py", line 69, in ?
main(sys.argv)
File "StartScanDaemon.py", line 61, in main
from scheduler.Scheduler import Scheduler
File "../scheduler/Scheduler.py", line 24, in ?
from peak.util.imports import lazyModule
File
"/usr/lib/python2.4/site-packages/Importing-1.9.1-py2.4.egg/peak/__init__.py",
line 1, in ?
__import__('pkg_resources').declare_namespace(__name__)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 2212, in ?
add_activation_listener(lambda dist: dist.activate())
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 517, in subscribe
callback(dist)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 2212, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 1843, in activate
map(declare_namespace, self._get_metadata('namespace_packages.txt'))
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 1447, in declare_namespace
declare_namespace(parent)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 1462, in declare_namespace
_handle_ns(packageName, path_item)
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 1433, in _handle_ns
loader.load_module(packageName); module.__path__ = path
File
"/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
line 1262, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File
"/usr/lib/python2.4/site-packages/matplotlib-0.87.2-py2.4-linux-i686.egg/matplotlib/__init__.py",
line 999, in ?
rcParams = rc_params()
File
"/usr/lib/python2.4/site-packages/matplotlib-0.87.2-py2.4-linux-i686.egg/matplotlib/__init__.py",
line 956, in rc_params
fname = matplotlib_fname()
File
"/usr/lib/python2.4/site-packages/matplotlib-0.87.2-py2.4-linux-i686.egg/matplotlib/__init__.py",
line 902, in matplotlib_fname
fname = os.path.join(get_configdir(), 'matplotlibrc')
File
"/usr/lib/python2.4/site-packages/matplotlib-0.87.2-py2.4-linux-i686.egg/matplotlib/__init__.py",
line 273, in wrapper
ret = func(*args, **kwargs)
File
"/usr/lib/python2.4/site-packages/matplotlib-0.87.2-py2.4-linux-i686.egg/matplotlib/__init__.py",
line 329, in _get_configdir
os.mkdir(p)
OSError: [Errno 17] File exists: '/home/prodpy/.matplotlib'
More information about the PEAK
mailing list