Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Problem with shelve/gdbm

Reply
Thread Tools

Problem with shelve/gdbm

 
 
Douglas Applegate
Guest
Posts: n/a
 
      10-19-2007
Hi-

I am having a problem with shelve. The problem I think is really with
gdbm. I'll write out a file using shelve/gdbm on an amd64 machine and
then I'll try to read it in on a i386 machine. The result is a 'gdbm
fatal: read error.' Reversing directions results in the same problem.
Below are two small programs that get at the heart of the problem:

#test.py##############
#!/usr/bin/env python
import gdbm
print gdbm
storage = gdbm.open('test.pstor', 'c')

storage['test'] = 'a'

storage.close()


#test2.py#########
#!/usr/bin/env python
import gdbm
print gdbm
storage = gdbm.open('test.pstor', 'r')

print storage['test']

storage.close()

#####################################
The result of running test2 is as follows:

<module 'gdbm' from '/---/software/python/lib/python2.5/lib-dynload/gdbm.so'>
Traceback (most recent call last):
File "./test2.py", line 4, in <module>
storage = gdbm.open('test.pstor', 'r')
gdbm fatal: read error



It isn't much to go on, but has anybody else had this problem?


Cheers,
Doug
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments