[Python-bugs-list] [Bug #128037] problems using the shelve module

noreply@sourceforge.net noreply@sourceforge.net
Mon, 08 Jan 2001 06:35:45 -0800


Bug #128037, was updated on 2001-Jan-08 06:35
Here is a current snapshot of the bug.

Project: Python
Category: Python Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: rosleff
Assigned to : nobody
Summary: problems using the shelve module

Details: I'm running Python 1.5.2 (#4, Jan 12 2000, 22:14:11)  [GCC 2.95
19990728 (release)] on irix646. 

While using the shelve module the following error message occurs:

>>> import shelve
>>> class someClass:
...   def __init__(self):
...     self = [13, 17]
... 
>>> object = someClass()
>>> dbase = shelve.open('testshelve')
>>> dbase['key'] = object
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python1.5/shelve.py", line 71, in __setitem__
    self.dict[key] = f.getvalue()
  File "/usr/local/lib/python1.5/dumbdbm.py", line 111, in __setitem__
    (pos, siz) = self._addval(val)
  File "/usr/local/lib/python1.5/dumbdbm.py", line 87, in _addval
    f.write('\0'*(npos-pos))
TypeError: can't multiply sequence with non-int


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=128037&group_id=5470