[ZODB-Dev] ZEO2, sys.path, start.py and docs

Jeff Rush jrush@taupro.com
Wed, 27 Nov 2002 05:46:21 -0600


I recently had similar problems with relative
paths to the Data.fs in the ZEO server re the
chdir().  I switched to absolute paths thruout
and everything was fine.  I haven't had time
to revisit and submit bug reports on what went
wrong.  Some definite pathing gators there...

-Jeff Rush


Adrian van den Dries wrote:
> 
> I have just downloaded and tried to install ZEO 2.0, following the
> instructions in docs/ZopeREADME.txt, but I have come up against this
> error:
> 
> adriand@baldrick:~/Zope/ZSS$ python lib/python/ZEO/start.py -p 9999 -D
> Traceback (most recent call last):
>   File "lib/python/ZEO/start.py", line 235, in main
> ImportError: No module named StorageServer
> 
> Upon inspection, I see that start.py does some sys.path munging,
> inserting 'lib/python'.  But later on, it does a os.chdir(env.var), so
> this path is now relative to the var directory.  The problem goes away
> if I use an absolute path to start.py or disable ZDaemon.
> 
> Have I done something wrong or is the README incorrect?
> 
> I am using stock Debian/woody python2.1.3.
> 
> P.S.  It seems to me that this whole path-munging business is about
> finding where Zope lives, which would be solved with a (suprise,
> surprise) java-style ZOPE_HOME, set either at installation time or by
> the administrator.  Surely this would be easier and less error-prone
> than cryptic path-munging functions?