py-leveldb-windows
py-leveldb-windows copied to clipboard
import leveldb error, it said: SystemError: GetStats() method: bad call flags
I succeed in compiling under Visual Studio 2019 on Windows 8 with python 3.9, and I copy leveldb.pyd to the directory of python39/Lib/site-packages.
Then I run test-py3-leveldb.py, and I got error as following:
Traceback (most recent call last):
File "D:\BlockProjects\test_levedb.py", line 3, in
how to solve this issue ?
I compiled under Visual Studio 2019 on Windows 10 with python 3.8 and I got the same error. I solved the issue in my environment:
- edit the leveldb_object.cc file, 766th line, delete "METH_VARARGS | ".
- recompile the project.