Open tindiz opened 6 months ago
I cannot reproduce this.
I installed python3.11 and copied your test into this file: C:\tmp\x\issue_160.py
Then I ran it like this:
> C:\Python311\python.exe -m pip install tensorstore
> C:\Python311\python.exe issue_160.py
0.1.59
Test 1 passed!
Test 2 passed
Test 3 passed
Test 4 passed
> dir /A /S /B
C:\tmp\x\issue_160.py
C:\tmp\x\tmp_n5
C:\tmp\x\tmp_zarr
C:\tmp\x\tmp_n5\attributes.json
C:\tmp\x\tmp_zarr\.zarray
It also passes with tensorstore 0.1.60:
C:\tmp\x>C:\Python311\python.exe issue_160.py
0.1.60
Test 1 passed!
Test 2 passed
Test 3 passed
Test 4 passed
C:\tmp\x>dir /a /s /b
C:\tmp\x\issue_160.py
C:\tmp\x\tmp_n5
C:\tmp\x\tmp_zarr
C:\tmp\x\tmp_n5\attributes.json
C:\tmp\x\tmp_zarr\.zarray
Note: This spec will try to write at the root of wherever you are running. So in my case, running in C:\tmp\x
, the output will actually be created in C:\tmp_zarr_new
.
spec = {
'driver': 'zarr',
'kvstore': {
'driver': 'file',
'path': "/tmp_zarr_new",
}
}
I have the same problem writing from inside WSL 2 to a windows drive (/mnt/c/...). Version: v0.1.64 Python: 3.10.12
ValueError: NOT_FOUND: Error opening "n5" driver: Error writing local file "/mnt/c/dataset/ml/attributes.json": [OS error 2: No such file or directory]
File is created on the drive. Opening it afterwards works. Writing to it again fails:
ValueError: NOT_FOUND: Error writing local file "/mnt/c/dataset/ml/0/1/1/0": [OS error 2: No such file or directory]
That appears to be a different problem, as wsl is actually running Linux against a particular network filesystem. However it probably shouldn't fail.
It appears to be a failure when ::fstat()
is called on an open fd on the wsl network filesystem.
The ::fstat() issue may work if you build from source after https://github.com/google/tensorstore/commit/52c2dda51fb8225de86e5e08277baa97636438f6
I can test on my WSL instance later.
edit: That appears insufficient to solve the problem.
Related to #123.
Writing to filesystem fails on Windows 11.
It is interesting that this spec does not throw the exception, but unfortunately it does not work since no files are created on the filesystem:
I also tried with different configurations, but this is a minimal code block that showcases the issue. Please let me know if you need more info.
I am attaching the script with further details:
Output: