Description
If there is an ImportError inside the definition of class FarmConfig, the error message is "No module named wikiconfig" and the traceback is unhelpful.
Steps to reproduce
Under "class FarmConfig(DefaultConfig):", insert a statement "import NonexistentModule".
- Try to visit a moin page.
Details
Workaround
Add a hint/faq that nested import errors can be the cause of "No module named wikiconfig".
Copying the wikiconfig.py from the instance to /usr/lib/python2.4/ solved the problem. Should this be considered a bug?
- Yes, it is a bug in your installation, because obviously wikiconfig was not on sys.path before (but in the python directory, it is). No need for a workaround, just fix your sys.path.
Discussion
aaa.py:
import bbb
bbb.py: does not exist
>>> __import__('aaa', {}, {}) Traceback (most recent call last): File "<stdin>", line 1, in ? File "aaa.py", line 1, in ? import bbb ImportError: No module named bbb >>> __import__('aaa', {}, {}) <module 'aaa' from 'aaa.pyc'>
Happens with py 2.3.5 (maybe also with other 2.3.x). 2.4.x behaves normal.
I have 2.4.4 on a Debian etch (moin 1.5.7) and the same thing happened. Module ldap was missing, and I got "no module named wikiconfig". AntonisChristofides, 21 Feb 2007
Please add your traceback.html .
Plan
- Priority:
- Assigned to:
Status: maybe related to a python 2.3 __import__ bug