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
512 is current length limit for the path, and it is more than enough. (the longest path in archive I found is 192:
dandi@drogon:/mnt/backup/dandi/dandisets$ declare m=0;fordsin 00*;do git -C $ds ls-tree -r --name-only HEAD;done| awk '{ if (length($0) > max) max = length($0) } END { print max }'
192
dandi@drogon:/mnt/backup/dandi/dandisets$ pwd
/mnt/backup/dandi/dandisets
but if I do attempt to upload a file with path length greater -- it causes 500
❯ DANDI_DEVEL=1 dandi upload --allow-any-path $fn
2024-03-06 20:34:17,039 [ INFO] Found 2 files to consider
PATH SIZE ERRORS PROGRESS STATUS MESSAGE
dandiset.yaml 3.0 kB skipped should be ed...
...901234567890123456789_data.dat 4 Bytes 0 producing asset
Summary: 3.1 kB 1 skipped 1 should be ...
1 producing ...
...901234567890123456789_data.dat 4 Bytes 0 ERROR 500 Server E...
Summary: 3.1 kB 1 skipped 1 should be ...
1 ERROR 1 500 Server...
2024-03-06 20:35:13,412 [ INFO] Logs saved in /home/yoh/.local/state/dandi-cli/log/20240307013414Z-313889.log
Traceback (most recent call last):
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/bin/dandi", line 8, in<module>sys.exit(main())
^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/click/decorators.py", line 45, in new_func
returnf(get_current_context().obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/cli/base.py", line 126, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/cli/cmd_upload.py", line 103, in upload
upload(
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/upload.py", line 459, in upload
raise upload_err
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/upload.py", line 357, in process_path
forrin dfile.iter_upload(
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/files/bases.py", line 455, in iter_upload
r = client.post(
^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/dandiapi.py", line 306, in post
return self.request("POST", path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/dandiapi.py", line 200, in request
fori, attemptin enumerate(
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 347, in __iter__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 325, in iter
raise retry_exc.reraise()
^^^^^^^^^^^^^^^^^^^
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 158, in reraise
raise self.last_attempt.result()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
returnself.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/home/yoh/proj/dandi/dandi-cli-master/dandi/dandiapi.py", line 236, in request
result.raise_for_status()
File "/home/yoh/proj/dandi/dandi-cli-master/venvs/dev3.11/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.dandiarchive.org/api/dandisets/000029/versions/draft/assets/
DANDI_DEVEL=1 dandi upload --allow-any-path $fn 2.27s user 2.93s system 8% cpu 58.988 total
❯
❯ echo$fn
sub-123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/sub-123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789_ses-1/sub-123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789_data.dat
❯ echo${#fn}
596
and as we on 500 re-try -- poor dandi-archive keeps 500ing:
…set must not exceed 512
ATM, if my check is right -- maximal length we can encounter is only 192, so we
are quite ok
dandi@drogon:/mnt/backup/dandi/dandisets$ pwd
/mnt/backup/dandi/dandisets
dandi@drogon:/mnt/backup/dandi/dandisets$ declare m=0;for ds in 00*; do git -C $ds ls-tree -r --name-only HEAD; done | awk '{ if (length($0) > max) max = length($0) } END { print max }'
192
When user manages to get over -- server 500s. Filed
dandi/dandi-archive#1889
512 is current length limit for the path, and it is more than enough. (the longest path in archive I found is 192:
but if I do attempt to upload a file with path length greater -- it causes 500
and as we on 500 re-try -- poor dandi-archive keeps 500ing:
I guess should be some kind of 400 code
The text was updated successfully, but these errors were encountered: