[ZODB-Dev] ZODB fails on test

Marius Gedminas marius at gedmin.as
Sun Aug 3 10:07:50 EDT 2008


On Sun, Aug 03, 2008 at 11:36:41AM +0300, Malka Cymbalista wrote:
> We are trying to install  ZODB3-3.4.2 on a Linux machine running Red
> Hat Enterprise Linux AS release 4 and python 2.5.2.
...
> We then ran 
>    python test.py
> and got the results that are in the attached file.  This does not look
> right.  Can we continue with the installation?
> Any help will be appreciated.
...
> [root at webin ZODB3-3.4.2]$ python test.py
> 
> Running tests from build/lib.linux-x86_64-2.5
> Traceback (most recent call last):
>   File "test.py", line 61, in <module>
>     testrunner.run(defaults)
>   File "build/lib.linux-x86_64-2.5/zope/testing/testrunner.py", line 149, in run
>     options = get_options(args, defaults)
>   File "build/lib.linux-x86_64-2.5/zope/testing/testrunner.py", line 1269, in get_options
>     default_setup, _ = parser.parse_args(default_setup_args)
>   File "/usr/local/lib/python2.5/optparse.py", line 1385, in parse_args
>     stop = self._process_args(largs, rargs, values)
>   File "/usr/local/lib/python2.5/optparse.py", line 1425, in _process_args
>     self._process_long_opt(rargs, values)
>   File "/usr/local/lib/python2.5/optparse.py", line 1500, in _process_long_opt
>     option.process(opt, value, values, self)
>   File "/usr/local/lib/python2.5/optparse.py", line 776, in process
>     value = self.convert_value(opt, value)
>   File "/usr/local/lib/python2.5/optparse.py", line 768, in convert_value
>     return self.check_value(opt, value)
>   File "/usr/local/lib/python2.5/optparse.py", line 763, in check_value
>     return checker(self, opt, value)
>   File "/usr/local/lib/python2.5/optparse.py", line 420, in check_builtin
>     return cvt(value)
>   File "/usr/local/lib/python2.5/optparse.py", line 407, in _parse_int
>     return _parse_num(val, int)
>   File "/usr/local/lib/python2.5/optparse.py", line 394, in _parse_num
>     if val[:2].lower() == "0x":         # hexadecimal
> TypeError: 'int' object is unsubscriptable

This is a rather interesting failure.  It is caused by
zope.testing.testrunner used in ZODB 3.4.2 assuming optparse accepts
command line arguments that aren't strings.  See
http://zope3.pov.lt/trac/browser/zope.testing/tags/ZODB3.4.2/src/zope/testing/testrunner.py#L1257

You could fix that in your source tree by changing

    '--at-level', 1,

to

    '--at-level', '1',

in src/zope/testing/testrunner.py in your ZODB source tree and then
rerunning setup.py build.  Or you could switch to Python 2.3 or 2.4.

Trying to use 3-year-old software (ZODB 3.4.2) in an unsupported
configuration (Python 2.5) may have downsides.

Marius Gedminas
-- 
Anything can be made to work if you fiddle with it long enough.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20080803/fad807ca/attachment.bin


More information about the ZODB-Dev mailing list