Traceback with ZODB 3.9.0

View: New views
2 Messages — Rating Filter:   Alert me  

Traceback with ZODB 3.9.0

by Pedro Ferreira-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I was trying to migrate a machine from 3.8.1 to 3.9.0, but I'm getting
the following error:

"""
2009-09-25T16:34:35 (2606) new connection ('137.138.4.155', 45551):
<ManagedServerConnection ('137.138.4.155', 45551)>
2009-09-25T16:34:35 (137.138.4.155:45551) received handshake 'Z309'
2009-09-25T16:34:35 (137.138.4.155:45551) Error caught in asyncore
Traceback (most recent call last):
  File "/usr/lib64/python2.4/asyncore.py", line 77, in write
    obj.handle_write_event()
  File "/usr/lib64/python2.4/asyncore.py", line 398, in handle_write_event
    self.handle_write()
  File "/usr/lib64/python2.4/site-packages/ZEO/zrpc/smac.py", line 276,
in handle_write
    message = message.next()
  File "/usr/lib64/python2.4/site-packages/ZEO/zrpc/smac.py", line 147,
in hack
    self.__hmac_send = hmac.HMAC(sesskey, digestmod=ZEO.hash)
  File "/usr/lib64/python2.4/hmac.py", line 44, in __init__
    self.digest_size = digestmod.digest_size
AttributeError: 'module' object has no attribute 'digest_size'
2009-09-25T16:34:35 (2606/137.138.4.155:45551) disconnected
"""

(using Python 2.4.3 and hashlib 20060408a )

Which led me to ZEO/hash.py:

"""
try:
    import hashlib
    sha1 = hashlib.sha1
    new = sha1
except ImportError:
    import sha
    sha1 = sha.new
    new = sha1
    digest_size = sha.digest_size
"""

Adding:
  digest_size = hashlib.sha1().digest_size
inside the try block fixes it.

Is this really a bug? Or am I doing something wrong?

Regards,

Pedro


_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@...
https://mail.zope.org/mailman/listinfo/zodb-dev

Re: Traceback with ZODB 3.9.0

by Andreas Jung-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am 25.09.09 16:54, schrieb Pedro Ferreira:

> Hello,
> I was trying to migrate a machine from 3.8.1 to 3.9.0, but I'm getting
> the following error:
>
> """
> 2009-09-25T16:34:35 (2606) new connection ('137.138.4.155', 45551):
> <ManagedServerConnection ('137.138.4.155', 45551)>
> 2009-09-25T16:34:35 (137.138.4.155:45551) received handshake 'Z309'
> 2009-09-25T16:34:35 (137.138.4.155:45551) Error caught in asyncore
> Traceback (most recent call last):
>   File "/usr/lib64/python2.4/asyncore.py", line 77, in write
>     obj.handle_write_event()
>   File "/usr/lib64/python2.4/asyncore.py", line 398, in handle_write_event
>     self.handle_write()
>   File "/usr/lib64/python2.4/site-packages/ZEO/zrpc/smac.py", line 276,
> in handle_write
>     message = message.next()
>   File "/usr/lib64/python2.4/site-packages/ZEO/zrpc/smac.py", line 147,
> in hack
>     self.__hmac_send = hmac.HMAC(sesskey, digestmod=ZEO.hash)
>   File "/usr/lib64/python2.4/hmac.py", line 44, in __init__
>     self.digest_size = digestmod.digest_size
> AttributeError: 'module' object has no attribute 'digest_size'
> 2009-09-25T16:34:35 (2606/137.138.4.155:45551) disconnected
> """
>
> (using Python 2.4.3 and hashlib 20060408a )
>
> Which led me to ZEO/hash.py:
>
> """
> try:
>     import hashlib
>     sha1 = hashlib.sha1
>     new = sha1
> except ImportError:
>     import sha
>     sha1 = sha.new
>     new = sha1
>     digest_size = sha.digest_size
> """
>
> Adding:
>   digest_size = hashlib.sha1().digest_size
> inside the try block fixes it.
>
> Is this really a bug? Or am I doing something wrong?
Very likely a bug (introduced while making the code work
for Python 2.6 at PyCon this year). Please file a bug report.
Unfortunately the bug could not be disovered through unittests.

-aj


[lists.vcf]

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:info@...
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard



_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@...
https://mail.zope.org/mailman/listinfo/zodb-dev