473,809 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

shelve module on a gentoo/amd64 machine

I've run into a problem on this platform (amd64) with code that works
elsewhere, on x86, sparc, and ppc platforms. The shelve module is throwing
an error raised from the anydbm call inside it:

Python 2.3.3 (#1, Feb 17 2004, 22:00:49)
[GCC 3.3.2 20040119 (Gentoo Linux 3.3.2-r7, propolice-3.3-7)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.
import shelve
x = shelve.open('ts etse.fly') Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/shelve.py", line 231, in open
return DbfilenameShelf (filename, flag, protocol, writeback, binary)
File "/usr/lib/python2.3/shelve.py", line 212, in __init__
Shelf.__init__( self, anydbm.open(fil ename, flag), protocol, writeback,
binary)
File "/usr/lib/python2.3/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.3/dbhash.py", line 16, in open
return bsddb.hashopen( file, flag, mode)
File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBInv alidArgError: (22, 'Invalid argument -- DB_ENV->dbremove:
method not permitted before open')

raw calls to anydbm to open a db fail similarly:
x = anydbm.open('ts ts', 'c')

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/anydbm.py", line 83, in open
return mod.open(file, flag, mode)
File "/usr/lib/python2.3/dbhash.py", line 16, in open
return bsddb.hashopen( file, flag, mode)
File "/usr/lib/python2.3/bsddb/__init__.py", line 192, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb._db.DBInv alidArgError: (22, 'Invalid argument -- DB_ENV->dbremove:
method not permitted before open')

.... I'd love to know what's going on here. =) any clues deeply appreciated.
let me know if I can provide any more information.

-B
Jul 18 '05 #1
0 1130

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4765
by: Rami A. Kishek | last post by:
Hi - this mysterious behavior with shelve is just about to kill me. I hope someone here can shed some light. First of all, I have this piece of code which uses shelve to save instances of some class I define. It works perfectly on an old machine (PII-400) running Python 2.2.1 under RedHat Linux 8.0. When I try to run it under Python for windows ME on a P-4 1.4 GHz, however, it keeps crashing on reading from the shelved file the second...
0
1048
by: PiedmontBiz | last post by:
I am finishing up a simple survey for a web site. I am creating a server-side data base using the shelve module. I am a relative python newcomer. I began with anydbm, but found that shelve uses anydbm and pickle so it is a bit easier for me to do what I want. The database I am testing list 4 candidates for president. A web form ( I use javascript to validate the data before sending it on ) posts the users survey data to a server-side...
2
1648
by: Michael P. Soulier | last post by:
I'm trying to add objects to a shelve db object via hash assignment, but I'm getting an odd exception. Traceback (most recent call last): File "RemGui.py", line 117, in onMonitorButton self.startMonitoring() File "RemGui.py", line 163, in startMonitoring self.monitor() File "RemGui.py", line 181, in monitor self.db.store_sample(dbentry)
0
956
by: Bill | last post by:
I am trying to deploy a backend vb.net application on a production server. It works like a champ in the test env. But falls over very fast after I deploy it. It issues a message 'application has generated an exception that could not be handled', and then additionally I get 'registered jit debugger is not availiable'. The very 1st thing I do in this program is msgbox a blurb, which never appears. My asp.net application is working without a...
1
1697
by: mathieu.malaterre | last post by:
Hello, I am trying to build an executable that link against python libraries. If I only link to python lib I get thoses errors(*). This machine is a gentoo AMD64. I installed python by doing 'emerge python' and my USE flags uses 'zlib'. I am wondering if there is a 'python-config' like script that would tell me that I also need to link against zlib libraries in order to properly link my executable ?
4
1070
by: softwindow | last post by:
according to the book instruduction , i use shelve Module to write record to file. i only write ten records like this: name sex age jim male 22 tom male 23 lucy female 21
6
2004
by: John Pye | last post by:
Hi all I have a tricky situation that's preventing my Python/SWIG/C application from running on the Debian Etch AMD64 platform. It seems that the 'dl' module is not available on that platform. The only reason I need the 'dl' module, however, is for the values of RTLD_LAZY etc, which I use with sys.setdlopenflags() in order to make my imported SWIG module share its symbols correctly with more deeply- nested plugin modiles in my C-code...
0
1040
by: Douglas Applegate | last post by:
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
0
851
by: Gabriel Genellina | last post by:
En Mon, 28 Apr 2008 02:08:31 -0300, tarun <tarundevnani@gmail.comescribió: By default, each time you do d you get a *different* object. A shelve isn't very smart: it stores a string representation of your object (using pickle) and each time you ask for the object, it unpickles the stored string. When used as a persistence mechanism, it doesn't matter so much, the process that created the original instance may have died eons ago. If object...
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.