You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try and do Index.restore(, view=True) on an index file created by a different user I get an error:
Traceback (most recent call last):
File "/home/sfarr_test/test_load.py", line 5, in <module>
index=Index.restore('test.index', view=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sfarr_test/usearch/lib/python3.11/site-packages/usearch/index.py", line 604, in restore
index.view(path_or_buffer)
File "/home/sfarr_test/usearch/lib/python3.11/site-packages/usearch/index.py", line 975, in view
self._compiled.view_index_from_path(os.fspath(path_or_buffer), progress)
RuntimeError: Operation not permitted
Steps to reproduce
with user 1:
import numpy as np
from usearch.index import Index
index = Index(ndim=4)
vectors = np.random.random(size=(100,4))
index.add(list(range(len(vectors))), vectors)
print(index)
index.save('test.index')
with user 2:
import numpy as np
from usearch.index import Index
index=Index.restore('test.index', view=True)
print(index)
Expected behavior
The index should restore for user2 if view=True. It only restores properly if I change to view=False
USearch version
2.11.7
Operating System
Ubuntu 22.04
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
No response
Are you open to being tagged as a contributor?
I am open to being mentioned in the project .git history as a contributor
Is there an existing issue for this?
I have searched the existing issues
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
That sounds like a file permissions issue unrelated to USearch. Can you try creating and reading an arbitrary text file? Or simply checking file permissions?
Yes that is my main thought, I have checked this as much as possible. If I use Index.restore('test.index') it loads sucessfully. It is only when I try and use view=True where there is the error. There are no permission errors for other file operations. I am wondering if it is something related to the memory mapping settings.
Describe the bug
If I try and do Index.restore(, view=True) on an index file created by a different user I get an error:
Steps to reproduce
with user 1:
with user 2:
Expected behavior
The index should restore for user2 if view=True. It only restores properly if I change to view=False
USearch version
2.11.7
Operating System
Ubuntu 22.04
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
No response
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: