Questions tagged [dbm]

DBM is a simple UNIX database format. It uses a key-value storage and hashing for fast retrieval of the data by key.

98 questions
1
vote
1 answer

Django makemigrations error on many to many relationship

What i want: Store information about running of group of people. What i did: from django.db import models from django.contrib.auth.models import User from datetime import timedelta class Route(models.Model): name =…
Naur
  • 81
  • 7
1
vote
0 answers

open attribute is not working for sqlite3dbm

I have to develop dbm module using sqlite. Hence I have imported sqlite3dbm with open attribute to create the new database. But it is saying "module 'sqlite3dbm' has no attribute 'open'". The code which i m trying to run is from internet. Is…
Bhagya
  • 31
  • 5
1
vote
1 answer

Convert Python shelve from dbm.gnu to dbm.dumb

I am trying to convert data stored in a non-dumb shelve to a dumb shelve, to be able to access my data at a location where the non-dumb libraries are not installed. My test code for transforming the db data looks like this: import numpy as np import…
zanzu
  • 25
  • 4
1
vote
0 answers

Use dbm.ndbm / Berkeley DB to open a serialized Python shelve on a machine where only dbm.dumb seems to be installed

I am using a software package which generates serialized Python shelves. On the remote machine where the shelves are generated, I can open them and process them perfectly. However, when I copy them on my local machine, they cannot be opened…
zanzu
  • 25
  • 4
1
vote
1 answer

Export blob column from mysql dB to disk and replace it with new file name

So I'm working on a legacy database, and unfortunately the performance of database is very slow. Simple select query can take up to 10 seconds in tables with less than 10000 record. So i tried to investigate problem and found out that deleting…
Zalaboza
  • 8,899
  • 16
  • 77
  • 142
1
vote
0 answers

Strategy for converting JSON to DBM Hash File (AEM with Apache backend)

I'm looking for some solution design assistance, as an idea I thought I could mimic apache's httxt2dbm tool. Use case: We currently manage our 301 RewriteRule's in apache for our AEM environment. My co-worker has built a webform for end users to…
Nobe's
  • 138
  • 2
  • 13
1
vote
1 answer

How to store an instance object in shelve?

instance1 = class_A() shelve["key1"] = instance1 So instance1 is a reference to an instance of class_A stored in memory. Does the above code dereferences the reference instance1 and stores the underlying object instance in shelve? Or does it only…
NoName
  • 9,824
  • 5
  • 32
  • 52
1
vote
1 answer

When starting flower, I get the following: "dbm.error: db type is dbm.gnu, but the module is not available"

I am currently trying to setup a Python monitoring tool, called Flower, to check whether tasks are being successfully processed. Currently this is my setup is as follows: ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1044-aws x86_64) python 3.6.7 celery…
lollerskates
  • 964
  • 1
  • 11
  • 28
1
vote
1 answer

db2 update dbm cfg immediate

I am looking as the following article: https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.1.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001988.html I would like to ask about the IMMEDIATE and the DEFERRED part. Sorry I am still confuse and not…
Panadol Chong
  • 1,793
  • 13
  • 54
  • 119
1
vote
1 answer

Python DBM KeyError

how can i print 'ok' when i find the a key value in the for >>> with dbm.open('data1.db','r') as user: user['0'] = '1' user['1'] = '2' user['2'] = '3' for i in user: if '3' in user[str(i)]: print('ok') Traceback…
Thomas Caio
  • 83
  • 1
  • 1
  • 11
1
vote
1 answer

Oracle tns listener error

I've just installed Oracle 10g When I try to connect to oracle db i get an error: could not start OracleOraHome92TNSListener when i got to services and try to start it, it says that the file doesnt exist. the service file is…
124697
  • 22,097
  • 68
  • 188
  • 315
1
vote
0 answers

Process takes a long time to terminate, stuck in a stream of munmap

I have a Python 2.7 process (started by cron) on a Linux box that takes a very long time (10s of minutes) to terminate. While it is running, it uses a lot of memory (25GB) and it appears to take a lot of time releasing it. strace reports an endless…
sds
  • 58,617
  • 29
  • 161
  • 278
1
vote
1 answer

recipe for working with compressed (any)dbm files in python

I have a big-ol' dbm file, that's being created and used by my python program. It saves a good amount of RAM, but it's getting big, and I suspect I'll have to gzip it soon to lower the footprint. I guess usage will involve un-gzipping it to the…
Jay
  • 2,535
  • 3
  • 32
  • 44
1
vote
1 answer

Syncing but not closing a dbm

Is it a problem to do : import time import dumbdbm db = dumbdbm.open('db.db', 'c') # modify the persistent dict / "DB" here db['foo'] = 'bar' db.sync() while True: # doing other things, sometimes modifying the db + syncing with…
Basj
  • 41,386
  • 99
  • 383
  • 673
1
vote
2 answers

DBM::Deep is failing to import hashref having 'true' or 'false' values

I have the JSON text as given below : test.json { "a" : false } I want to create the DBM::Deep hash for above JSON. My code is looks like as given below : dbm.pl use strict; use warnings; use DBM::Deep; use JSON; use Data::Dumper; # create the…
CodeQuestor
  • 881
  • 1
  • 11
  • 25