Closed abersheeran closed 3 years ago
this error is reported by leveldb, and does not seem to originate from python.
i can't reproduce with plyvel 1.3.0 on python 3.8 on linux, without an existing database:
$ python -m venv tmpenv
$ ./tmpenv/bin/pip install plyvel
Collecting plyvel
Using cached plyvel-1.3.0-cp38-cp38-manylinux2010_x86_64.whl (738 kB)
Installing collected packages: plyvel
Successfully installed plyvel-1.3.0
$ ./tmpenv/bin/python
Python 3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import plyvel
>>> import plyvel
>>> db = plyvel.DB('./hash-leveldb/', create_if_missing=True)
>>> db.put(b'hello', b'world')
>>> db.get(b'hello')
b'world'
>>>
so...
Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux
plyvel 1.3.0 Ubuntu20.04 wheel No old database yes, is ok and has permissions. only one process and one threading
closing this issue since this is likely not a plyvel problem.
your problem is quite likely your file system, e.g. a file system type that doesn't work well with what leveldb expects (e.g. file locking support).
you can confirm this hypothesis by trying with a database in /tmp
or a directory residing on a native file system on the same machine with the same program.
All code.