You are not logged in.

#1 2012-02-10 09:12:07

magikmw
Member
Registered: 2012-02-10
Posts: 5

python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

Hello, this is my first post on Arch BBS.

I have a problem I cannot solve by google-fu or mad keysmashing, and I felt cornered into posting here for help.
Ironically, I've already solved that problem on my other arch system, but forgot how I did it. And nothing seems to bring it back.

Here's the problem:
I'm writting an application that uses python's shelve module. The shelve module calls anydb, that calls dbhash, that one calls bsddb, and finally that one calls _bsddb, and can't find it. The program crashes.

[I'll insert the trackback here later as I cannot reach the machine in question right now]

I have python-bsddb installed, doesn't help. I even tried compiling python from sources and running the script with that, same history.
I also have gdbm (I've found that anydbm calls if it finds it), and db packages. No good.
The script worked on ubuntu that I had installed on the same machine just before, python 2.6.

Thanks for any help!

MW

[edit:typo]

Last edited by magikmw (2012-02-14 14:31:34)

Offline

#2 2012-02-10 11:42:10

whitie
Member
Registered: 2011-03-13
Posts: 23

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

Hello magikmw,
I think for Python 2.7 you need python2-bsddb installed.

python-bsddb is for Python 3.x, which is the default in Arch.

Whitie

Last edited by whitie (2012-02-10 11:43:08)

Offline

#3 2012-02-10 11:50:27

magikmw
Member
Registered: 2012-02-10
Posts: 5

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

I knew I've forgotten about something in this post.

Yes, I do have python2-bsddb installed as well. Doesn't help.

MW

Offline

#4 2012-02-10 16:34:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

Offline

#5 2012-02-10 21:30:21

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

Sidenote: shelve/pickle is usually something you don't want to use, for various reasons.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2012-02-14 14:31:06

magikmw
Member
Registered: 2012-02-10
Posts: 5

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

Thanks for answers. After config-screwup related nuke and reinstall the problem went away for some reason. I'll keep the bug report bookmarked and check the suggested 'solution' if need arises.

Mr.Elendig wrote:

Sidenote: shelve/pickle is usually something you don't want to use, for various reasons.

I think you are right, but I'm still not sure how to keep persistent data otherwise. Newbie me.

Offline

#7 2012-02-15 16:46:10

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: python2.7 shelve / bsddb broken? help needed [SOLVED ITSELF]

What to use depends on just what you want to save. json(or similar), sql, nosql etc is common ways to store state.

One issue with shelve/pickle, is that you might not be able to load it back if you upgrade python, or switch to some other python implimentation etc.

Last edited by Mr.Elendig (2012-02-15 16:47:06)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB