On Apr 5, 12:14 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> test1.py:
> --------------------
> import shelve
>
> s = shelve.open("/Users/me/2testing/dir1/aaa.txt")
> s['x'] = "red"
> s.close()
> --------output:------
>
> $ python test1.py
> Traceback (most recent call last):
>   File "test1.py", line 3, in ?
>     s = shelve.open("/Users/me/2testing/dir1/aaa.txt")
>   File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/shelve.py", line 231, in open
>     return DbfilenameShelf(filename, flag, protocol, writeback,
> binary)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/shelve.py", line 212, in __init__
>     Shelf.__init__(self, anydbm.open(filename, flag), protocol,
> writeback, binary)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/anydbm.py", line 80, in open
>     raise error, "db type could not be determined"
> anydbm.error: db type could not be determined
> Exception exceptions.AttributeError: "DbfilenameShelf instance has no
> attribute 'writeback'" in  ignored
> ---------------------
>
> What should I do to correct that error?

how did you generate aaa.txt?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to