-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db type is dbm.gnu, but the module is not available #224
Comments
Someone comented in this blog https://community.anaconda.cloud/t/how-to-get-gdbm-module/35785/5 The cause of the error is unknown, but “_gdbm.cpython-39-x86_64-linux-gnu.so”, which should exist under “/lib/python3.9/lib-dynload/”, does not exist. . If another version of the corresponding library exists, copying it to the above directory will solve the problem. But I am not able to solve it this way. What other alternatives do you recommend to open the database? |
Hi @villegmb, Just for a little more context, can you share the command you were trying to do to open the database? Thanks, |
Hello. I am following this https://nanocompore.rna.rocks/demo/SampCompDB_usage/
|
Hi @villegmb, Just a few more quick questions, and some possible solutions assuming some things about your setup. Was the db generated on a linux, windows, or macOs machine? If you didn't install Nanocompore in a clean virtual environment, I recommend reinstalling Nanocompore in a new virtual environment and trying to open the database using the new virtual environment. I've seen two possible solutions if you're on a linux machine. or try to reinstall it using pip (this might also work on Windows): If you're on a macOs you can try to install the gdbm library using: Alternatively, this stacked overflow post seems to suggest that the issues comes from the pycache folders in the source code. Let me know if any of these possible solutions work for you. Logan |
Hello, I am following your instructions and I get this error:
2023-11-15 15:55:54.103 | INFO | nanocompore.SampCompDB:init:55 - Loading SampCompDB
2023-11-15 15:55:54.108 | ERROR | nanocompore.common:init:22 - The result database cannot be opened
error Traceback (most recent call last)
~/miniconda3/envs/nanocompore/lib/python3.7/site-packages/nanocompore/SampCompDB.py in init(self, db_fn, fasta_fn, bed_fn, run_type)
58 try:
---> 59 with shelve.open(db_fn, flag='r') as db:
60 # Try to get metadata from db
~/miniconda3/envs/nanocompore/lib/python3.7/shelve.py in open(filename, flag, protocol, writeback)
242
--> 243 return DbfilenameShelf(filename, flag, protocol, writeback)
~/miniconda3/envs/nanocompore/lib/python3.7/shelve.py in init(self, filename, flag, protocol, writeback)
226 import dbm
--> 227 Shelf.init(self, dbm.open(filename, flag), protocol, writeback)
228
~/miniconda3/envs/nanocompore/lib/python3.7/dbm/init.py in open(file, flag, mode)
90 raise error[0]("db type is {0}, but the module is not "
---> 91 "available".format(result))
92 else:
error: db type is dbm.gnu, but the module is not available
During handling of the above exception, another exception occurred:
NanocomporeError Traceback (most recent call last)
/tmp/ipykernel_83020/1373531596.py in
2 db = SampCompDB (
3 db_fn = "/ibex/scratch/projects/c2078/Heat_stress_analysis/final_result_nanocompore/final_final_results/outSampComp.db",
----> 4 fasta_fn = "/ibex/scratch/projects/c2078/Villegmb/20230913_P4U2_2/Ahem_transcript_rename.fasta")
5
6 # Print general metadata information
~/miniconda3/envs/nanocompore/lib/python3.7/site-packages/nanocompore/SampCompDB.py in init(self, db_fn, fasta_fn, bed_fn, run_type)
75 return None
76 except dbm_error:
---> 77 raise NanocomporeError("The result database cannot be opened")
78
79 # Save db prefix and db path
NanocomporeError: The result database cannot be opened
The text was updated successfully, but these errors were encountered: