[ZODB-Dev] ValueError: Can not re-register object under a different oid

Jeremy Hylton jeremy@zope.com
04 Apr 2003 12:30:04 -0500


On Thu, 2003-04-03 at 20:47, Greg Czajkowski wrote:
> Hi all, while using ZODB/ZEO 3.1.1 final for python
> 2.2.2 I run into another exception:
>     ...
>     get_transaction().commit()
>   File "C:\Python21\ZODB\Transaction.py", line 235, in
> commit
>     ncommitted += self._commit_objects(objects)
>   File "C:\Python21\ZODB\Transaction.py", line 349, in
> _commit_objects
>     jar.commit(o, self)
>   File "C:\Python21\ZODB\Connection.py", line 396, in
> commit
>     try: cache[oid]=object
> ValueError: Can not re-register object under a
> different oid
> 
> I am testing a while,try,catch ValueError,sleep,retry
> but Im speculating whether that will work.

I don't think there's any reason to expect it to work ;-).
If the object is already registered under a different oid, there's no
reason to expect the a sleep() call will change its oid.

Can you explain what the transaction did before committing?  I don't
understand how the object can have two oids.

Jeremy