shelve.py and "Invalid argument" error when try a "sync"
Steve Kirsch
stk at propel.com
Thu Feb 13 15:07:41 EST 2003
I have a little application that writes a very small amount of data
every couple of days to a file. It's been running almost 1 month with
no problem.... the file stays open, and i just sync to write out my
changes. Now, all of a sudden, i start seeing this error from the
.sync() method in shelve.py.
I am running on windows. My database is only 2K in size (there are
only about 12 keys in the entire database). And I used the
shelve.open(...) to create the file.
The error message looks like this:
File "database.py", line 253, in save
self.dict.sync()
File "c:\Python22\lib\shelve.py", line 94, in sync
self.dict.sync()
error: (22, 'Invalid argument')
So I've seen others report this as well...I'm just adding my own
experience.
I'm now going to re-write it so i close the file and re-open all the
time and see if that works around the problem.
More information about the Python-list
mailing list