[ZODB-Dev] Error when running zeopack (zeopack.py) from command line ("ImportError: No module named ZEO.ClientStorage")

Ricardo Dias Marques lists at ricmarques.net
Fri Feb 17 16:33:20 UTC 2012


Hi Andreas,

On Fri, Feb 17, 2012 at 15:28, Andreas Jung <lists at zopyx.com> wrote:

>  PYTHONPATH=/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO
>
> This is wrong. You must not include the package itself into the PATH
> (that's why it is call path). ..../lib/python is good enough

You're right! :)  Thank you very much. I exported PYTHONPATH again,
leaving out the "ZEO" this time, and now "zeopack.py" is working as
expected:

myhost:/ # export PYTHONPATH=/soft/Plone/Zope-2.10.9-final-py2.4/lib/python

myhost:/ # /soft/Plone/Python-2.4/bin/python
/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts/zeopack.py
Connect to a ZEO server and ask it to pack.

Usage: zeopack.py [options]

Options:

    -p port -- port to connect to

    -h host -- host to connect to (default is current host)

    -U path -- Unix-domain socket to connect to

    -S name -- storage name (default is '1')

    -d days -- pack objects more than days old

    -1 -- Connect to a ZEO 1 server

    -W -- wait for server to come up.  Normally the script tries to
       connect for 10 seconds, then exits with an error.  The -W
       option is only supported with ZEO 1.

You must specify either -p and -h or -U.

/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts/zeopack.py
1



Cheers,
Ricardo


> Ricardo Dias Marques wrote:
>> Hi all,
>>
>> I'm getting an error when trying to run zeopack (zeopack.py) from the
>> command line. This is a Linux server running the following "Zope
>> Version": "Zope 2.10.9-final, python 2.4.6, linux2". The Plone version
>> is 3.3.1
>>
>> The error message is "ImportError: No module named ZEO.ClientStorage".
>> Here's my attempt to run the command:
>>
>> myhost:/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts #
>> /soft/Plone/Python-2.4/bin/python
>> /soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts/zeopack.py
>> Traceback (most recent call last):
>>   File "/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts/zeopack.py",
>> line 33, in ?
>>     from ZEO.ClientStorage import ClientStorage
>> ImportError: No module named ZEO.ClientStorage
>>
>>
>> I saw some threads about this error that suggested to set / expand the
>> PYTHONPATH environment variable. I did not have that PYTHONPATH
>> environment variable defined.  So, I tried to define that variable:
>>
>> myhost:# export
>> PYTHONPATH=/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO:/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts
>>
>> myhost:# env | grep -i pythonpath
>> PYTHONPATH=/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO:/soft/Plone/Zope-2.10.9-final-py2.4/lib/python/ZEO/scripts
>>
>>
>> ... but I still get the same "ImportError: No module named
>> ZEO.ClientStorage" error message when trying to run again the command,
>> event after having defined PYTHONPATH with the above values.  :(
>>
>>
>> Could anyone give me some tips / pointers to what I'm doing wrong /
>> should be doing instead, please?
>>
>>
>> Thanks in advance!  :)
>>
>> Best wishes,
>> Ricardo Dias Marques
>> lists AT ricmarques DOT net
>> Identi.ca / Twitter: @ricmarques


More information about the ZODB-Dev mailing list