Bug #846
Fails to import CouchDBDocumentStore
0%
Description
On my OpenSuse build - bzr head fails to import CouchDBDocumentStore. Running e.g.
python build/test_CouchDBDocumentStore.py
returns
Traceback (most recent call last): File "build/test_CouchDBDocumentStore.py", line 25, in <module> from CouchDBDocumentStore import CouchDBDocumentStore ImportError: No module named CouchDBDocumentStore
I'm probably being an idiot but I can't see how files in src/common_py/docstore get into the PYTHONPATH - I would expect as in the case of e.g. src/common_py/geometry that we have something like a file src/common_py/geometry/_init__.py_ and then make a line like
import geometry.GDMLUnpacker
or whatever. src/common_py/ is in PYTHONPATH so this works (adding init.py makes geometry directory a python module, files inside become sub-modules).
Obviously the thing works on the test server, but I'm being thick and can't figure out how it works - and hence why it doesn't work locally for me.
Nb: would be great to have a fast reply as I don't really want to release until I at least understand what's going on.
Updated by Rogers, Chris almost 12 years ago
wiki formatting screwed up my
__init__.pybut I hope it makes sense
Updated by Jackson, Mike almost 12 years ago
configure / env.sh should set this up, in lp:maus/merge (for example) it has
export PYTHONPATH="\$MAUS_ROOT_DIR/src/common_py/docstore:\$PYTHONPATH" export LD_LIBRARY_PATH="\$MAUS_ROOT_DIR/src/common_py/docstore:\$LD_LIBRARY_PATH"