jnwatson / py-lmdb

Universal Python binding for the LMDB 'Lightning' Database
http://lmdb.readthedocs.io/
Other
644 stars 106 forks source link

lmdb.open(path) get lmdb.error path Function not implented #228

Closed Beta233 closed 4 years ago

Beta233 commented 4 years ago

Affected Operating Systems

Linux

Affected py-lmdb Version

0.98

py-lmdb Installation Method

pip install lmdb( in a conda environment)

Using?

Bundled

Distribution name and LMDB library version

(0,9,22)

Machine "free -m" output

Other important machine info

in a slurm computer cluster

Describe Your Problem

lmdb.open(exist_lmdb_path,readonly=True), get error.

Errors/exceptions Encountered

env = lmdb.open(path='./data_L/lmdb/Set5',readonly=True) Traceback (most recent call last): File "", line 1, in lmdb.Error: ./data_L/lmdb/Set5: Function not implemented

Describe What You Expected To Happen

An lmdb.Enverionment object shoulde be initialized.

get a strange lmdb.Error

jnwatson commented 4 years ago

"Function not implemented" is the result of looking up the error via strerror. Something deep in filesystem town is returning ENOSYS. Perhaps you're using an exotic filesystem that doesn't support memory mapping?

You might try moving the dataset to a different filesystem. If you want to explore some more, strace -e trace=file python badscript.py might give you more specifics about which system call failed.

Beta233 commented 4 years ago

Thanks for reply. According to the reply, I noticed that there's a data directory in my computer cluster that is used for the working data. I move my dataset to that directory, and the problem solved.

xmy0916 commented 10 months ago

env = lmdb.open(lmdb_file, readonly=True, lock=False) in my code add 'lock=False' fix the problem