Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG REPORT] OSError: symbolic link privilege not held #138

Closed
narendranss opened this issue Oct 14, 2019 · 2 comments
Closed

[BUG REPORT] OSError: symbolic link privilege not held #138

narendranss opened this issue Oct 14, 2019 · 2 comments
Labels

Comments

@narendranss
Copy link

narendranss commented Oct 14, 2019

Describe the bug
Following error is thrown post developer setup of Hangar in Windows machine while trying to assign a dummy image to repo array set - "OSError: symbolic link privilege not held"

Unexpected Behavior, Exceptions or Error Thrown

To Reproduce
Steps to reproduce the behavior, minimal example code:

import hangar
repo = hangar.Repository('.')
co = repo.checkout(write=True)
co.arraysets.init_arrayset('images', shape=(10,10,3),dtype=np.uint8)
co.commit('arrayset init')
images = co.arraysets['images']
img = np.random.random((10,10,3)).astype(np.uint8)
images[0] = img

images[0] = img
Traceback (most recent call last):
File "", line 1, in
File "c:\users\naren\documents\github\hangar-py\src\hangar\arrayset.py", line 502, in setitem
self.add(value, key)
File "c:\users\naren\documents\github\hangar-py\src\hangar\arrayset.py", line 624, in add
raise e from None
File "c:\users\naren\documents\github\hangar-py\src\hangar\arrayset.py", line 621, in add
raise ValueError(isCompat.reason)
ValueError: data shape: (10, 3, 3) != fixed aset shape: (10, 10, 3)
img = np.random.random((10,10,3)).astype(np.uint8)
images[0] = img
Traceback (most recent call last):
File "", line 1, in
File "c:\users\naren\documents\github\hangar-py\src\hangar\arrayset.py", line 502, in setitem
self.add(value, key)
File "c:\users\naren\documents\github\hangar-py\src\hangar\arrayset.py", line 648, in add
hashVal = self._fs[self._dflt_backend].write_data(data)
File "c:\users\naren\documents\github\hangar-py\src\hangar\backends\hdf5_00.py", line 677, in write_data
self._create_schema(remote_operation=remote_operation)
File "c:\users\naren\documents\github\hangar-py\src\hangar\backends\hdf5_00.py", line 553, in _create_schema
symlink_rel(file_path, symlink_file_path)
File "c:\users\naren\documents\github\hangar-py\src\hangar\utils.py", line 114, in symlink_rel
os.symlink(rel_path_src, dst, target_is_directory=is_dir)
OSError: symbolic link privilege not held

Expected behavior
No errors expected and the data getting assigned to the data array set is expected.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python: 3.7.5
  • Hangar: latest code
@narendranss
Copy link
Author

Working when command shell is run with Admin privileges.

@rlizzo
Copy link
Member

rlizzo commented Oct 15, 2019

Thanks for the bug report @narendranss! Sorry you had issues. I will take this into account and see if we can't remove the need for symbolic link privliges in a future release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants