bsddb.db.DBError: (21, 'Is a directory') python error in hashopen
up vote
0
down vote
favorite
I am attempting to get the we45 / ThreatPlaybook Python application (from github) to install under Ubuntu 18.04. I have managed to get through the installation up to the point where you run the threat-playbook installation and it fails with the message:
File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBError: (21, 'Is a directory')
The application installs fine on a Mac. Just wondered if there might be a way to get this to work under Ubuntu.
The file it is attempting to open is repo.db
This file is a Berkeley 1.85 database file as indicated by:
file repo.db
repo.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
The python code that attempts to open this file is:
def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
cachesize=None, lorder=None, hflags=0):
flags = _checkflag(flag, file)
e = _openDBEnv(cachesize)
d = db.DB(e)
d.set_flags(hflags)
if pgsize is not None: d.set_pagesize(pgsize)
if lorder is not None: d.set_lorder(lorder)
if ffactor is not None: d.set_h_ffactor(ffactor)
if nelem is not None: d.set_h_nelem(nelem)
d.open(file, db.DB_HASH, flags, mode)
return _DBWithCursor(d)
bsddb
add a comment |
up vote
0
down vote
favorite
I am attempting to get the we45 / ThreatPlaybook Python application (from github) to install under Ubuntu 18.04. I have managed to get through the installation up to the point where you run the threat-playbook installation and it fails with the message:
File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBError: (21, 'Is a directory')
The application installs fine on a Mac. Just wondered if there might be a way to get this to work under Ubuntu.
The file it is attempting to open is repo.db
This file is a Berkeley 1.85 database file as indicated by:
file repo.db
repo.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
The python code that attempts to open this file is:
def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
cachesize=None, lorder=None, hflags=0):
flags = _checkflag(flag, file)
e = _openDBEnv(cachesize)
d = db.DB(e)
d.set_flags(hflags)
if pgsize is not None: d.set_pagesize(pgsize)
if lorder is not None: d.set_lorder(lorder)
if ffactor is not None: d.set_h_ffactor(ffactor)
if nelem is not None: d.set_h_nelem(nelem)
d.open(file, db.DB_HASH, flags, mode)
return _DBWithCursor(d)
bsddb
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am attempting to get the we45 / ThreatPlaybook Python application (from github) to install under Ubuntu 18.04. I have managed to get through the installation up to the point where you run the threat-playbook installation and it fails with the message:
File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBError: (21, 'Is a directory')
The application installs fine on a Mac. Just wondered if there might be a way to get this to work under Ubuntu.
The file it is attempting to open is repo.db
This file is a Berkeley 1.85 database file as indicated by:
file repo.db
repo.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
The python code that attempts to open this file is:
def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
cachesize=None, lorder=None, hflags=0):
flags = _checkflag(flag, file)
e = _openDBEnv(cachesize)
d = db.DB(e)
d.set_flags(hflags)
if pgsize is not None: d.set_pagesize(pgsize)
if lorder is not None: d.set_lorder(lorder)
if ffactor is not None: d.set_h_ffactor(ffactor)
if nelem is not None: d.set_h_nelem(nelem)
d.open(file, db.DB_HASH, flags, mode)
return _DBWithCursor(d)
bsddb
I am attempting to get the we45 / ThreatPlaybook Python application (from github) to install under Ubuntu 18.04. I have managed to get through the installation up to the point where you run the threat-playbook installation and it fails with the message:
File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
d.open(file, db.DB_HASH, flags, mode)
bsddb.db.DBError: (21, 'Is a directory')
The application installs fine on a Mac. Just wondered if there might be a way to get this to work under Ubuntu.
The file it is attempting to open is repo.db
This file is a Berkeley 1.85 database file as indicated by:
file repo.db
repo.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
The python code that attempts to open this file is:
def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None,
cachesize=None, lorder=None, hflags=0):
flags = _checkflag(flag, file)
e = _openDBEnv(cachesize)
d = db.DB(e)
d.set_flags(hflags)
if pgsize is not None: d.set_pagesize(pgsize)
if lorder is not None: d.set_lorder(lorder)
if ffactor is not None: d.set_h_ffactor(ffactor)
if nelem is not None: d.set_h_nelem(nelem)
d.open(file, db.DB_HASH, flags, mode)
return _DBWithCursor(d)
bsddb
bsddb
asked Nov 7 at 22:39
secureray
11
11
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53198983%2fbsddb-db-dberror-21-is-a-directory-python-error-in-hashopen%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown