[ZODB-Dev] Problem Storing Infinity

Chris S chrisspen at gmail.com
Tue Sep 12 11:38:24 EDT 2006


I'm having a problem storing infinity. The following code reproduces
the problem on w2k:

from ZODB import FileStorage, DB
from persistent import Persistent
from persistent.mapping import PersistentMapping as dict
import transaction

storage = FileStorage.FileStorage('zodb.db')
db = DB(storage)
conn = db.open()
root = conn.root()
try:
    root['data'] = 1e99999999
finally:
    transaction.commit()
    conn.close()
    db.close()
    storage.close()

Traceback (most recent call last):
  File "test/test_zodb.py", line 14, in ?
    transaction.commit()
  File "C:\Program
Files\Python24\Lib\site-packages\transaction\_manager.py", line 96, in
commit
    return self.get().commit(sub, deprecation_wng=False)
  File "C:\Program
Files\Python24\Lib\site-packages\transaction\_transaction.py", line
380, in commi
t
    self._saveCommitishError() # This raises!
  File "C:\Program
Files\Python24\Lib\site-packages\transaction\_transaction.py", line
378, in commi
t
    self._commitResources()
  File "C:\Program
Files\Python24\Lib\site-packages\transaction\_transaction.py", line
433, in _comm
itResources
    rm.commit(self)
  File "C:\Program
Files\Python24\lib\site-packages\ZODB\Connection.py", line 484, in
commit
    self._commit(transaction)
  File "C:\Program
Files\Python24\lib\site-packages\ZODB\Connection.py", line 526, in
_commit
    self._store_objects(ObjectWriter(obj), transaction)
  File "C:\Program
Files\Python24\lib\site-packages\ZODB\Connection.py", line 553, in
_store_objects

    p = writer.serialize(obj)  # This calls __getstate__ of obj
  File "C:\Program
Files\Python24\Lib\site-packages\ZODB\serialize.py", line 407, in
serialize
    return self._dump(meta, obj.__getstate__())
  File "C:\Program
Files\Python24\Lib\site-packages\ZODB\serialize.py", line 416, in
_dump
    self._p.dump(state)
SystemError: frexp() result out of range


More information about the ZODB-Dev mailing list