python - dmb.error when looking up data, I need some pointers -


i have dbm file leads error when try access value directly:

>>> import dbm >>> db = dbm.open('scrapers','c') >>> key1 = db.keys()[0] >>> db[key1] traceback (most recent call last):   file "<stdin>", line 1, in <module> dbm.error >>> db.get(key1) '(dp1\ns\'username\'\np2\nnss\'password\'...etc... 

it happens file, contains pickled classes of scrapers various websites.

i can't provide actual db data because contains login data. question is: possible explanations problem? should start looking debug this?

if need other info (except data itself) please let me know.

turns out there's detail dbm isn't explained in python dbm docs:

the sum of sizes of key/content pair must not exceed internal block size (normally between 512 , 4096 bytes). 

i'm using gdbm now, , works fine.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -