jina-ai / annlite

⚡ A fast embedded library for approximate nearest neighbor search
Apache License 2.0
216 stars 22 forks source link

AttributeError: 'builtins.WriteOptions' object has no attribute 'set_sync' #224

Closed chimo599 closed 1 year ago

chimo599 commented 1 year ago

The issue I'm facing is related to using the annlite executor from Jina Hub, which requires the rocksdict library. The error message "AttributeError: 'builtins.WriteOptions' object has no attribute 'set_sync'" indicates that the set_sync method is not available in the version of rocksdict being used.

It appears that the newer versions of rocksdict have changed the attribute name from set_sync to sync. This means that you need to update the code that references set_sync to use sync instead.

i tried to install an older version of rocksdict (specifically version 0.2.16) to resolve the issue, but encountered an error that no matching distribution was found.

numb3r3 commented 1 year ago

Thanks for your report. Since rocksdict v0.3.9 it has some broken changes. I just fixed this issue in https://github.com/jina-ai/annlite/pull/225, and please upgrade annlite==0.5.9 to try it.