Duplicate blob when uploading via CLI
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
示されているバージョンとローカル API エンドポイントを使用して、dandi organize . に続けて dandi upload . を実行して再現します。まず dandi/upload.py、dandi/files/bases.py、および organize コマンドの symlink 処理を確認し、organize によって作成された symlink が二重にアップロードされないこと、また重複した POST や traceback なしに upload が完了することを検証します。
索引モデルが issue の本文から書いたものです。
説明
I'm running a local instance of dandi-archive (master) using dandi-schema (master).
I've installed dandi cli via pip install dandi in a separate venv
pip freeze | grep dandi
dandi==0.69.3
dandischema==0.11.1
$ dandi organize .
$ dandi upload .
Output and traceback
2025-06-05 13:11:07,679 [ INFO] Found 3 files to consider
PATH SIZE ERRORS PROGRESS STATUS MESSAGE
dandiset.yaml 2.3 kB skipped should be edited online
...-unsorted-nac/sub-Temp-pref-F30-B30-5dpf-01-unsorted-nac_behavior.nwb 9.3 MB pre-validating
...mp-pref-F30-B30-5dpf-01-unsorted-nac_ses-20230808T111800_behavior.nwb 9.3 MB pre-validating
Summary: 18.7 MB 1 skipped 1 should be edited online
2 pre-validating
/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/hdmf/spec/namespace.py:583: UserWarning: Ignoring the following cached namespace(s) because another version is already loaded:
core - cached version: 2.4.0, loaded version: 2.8.0
The loaded extension(s) may not be compatible with the cached extension(s) in the file. Please check the extension documentation and ignore this warning if these versions are compatible.
self.warn_for_ignored_namespaces(ignored_namespaces)
PATH SIZE ERRORS PROGRESS STATUS MESSAGE dandiset.yaml 2.3 kB skipped should be edited online
...-Temp-pref-F30-B30-5dpf-01-unsorted-nac_behavior.nwb 9.3 MB 0 ERROR Error 404 while sending POST reque...
...dpf-01-unsorted-nac_ses-20230808T111800_behavior.nwb 9.3 MB 0 ERROR Error 404 while sending POST reque...
Summary: 18.7 MB 1 skipped 1 should be edited online
2 ERROR 2 Error some while sending POST re...
2025-06-05 13:11:08,841 [ INFO] Logs saved in /home/austin/.local/state/dandi-cli/log/2025.06.05-18.11.07Z-553648.log
Traceback (most recent call last):
File "/home/austin/.pyenv/versions/tmp-dandi-cli/bin/dandi", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/click/decorators.py", line 45, in new_func
return f(get_current_context().obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/cli/base.py", line 126, in wrapper
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/cli/cmd_upload.py", line 103, in upload
upload(
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/upload.py", line 461, in upload
raise upload_err
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/upload.py", line 359, in process_path
for r in dfile.iter_upload(
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/files/bases.py", line 363, in iter_upload
resp = client.post(
^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/dandiapi.py", line 317, in post
return self.request("POST", path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/austin/.pyenv/versions/3.11.12/envs/tmp-dandi-cli/lib/python3.11/site-packages/dandi/dandiapi.py", line 285, in request
raise HTTP404Error(msg, response=result)
dandi.exceptions.HTTP404Error: Error 404 while sending POST request to http://localhost:8000/api/uploads/initialize/: {"detail":"Not found."}
The upload has made it into my dandiset locally, but we do have that traceback. Looking closer, I think this happens because dandi organize created a symlink, and dandi upload essentially tries to upload the same file twice.
- 主要言語
- Python
- スター
- 29
- フォーク
- 37
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 17
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dandi/dandi-cli のほかの issue
-
pynwb metadata: get neurodata types再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the result対応中かも @CodyCBakerPhD が 14 日前に担当しました。 オープンBIDS performance
dandi/dandi-cli#1962 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
BIDS bug
難易度 3/5 半日 初心者へのやさしさ 45/100
dandi/dandi-cli#1961 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
dandi/dandi-cli#1920 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
dandi/dandi-cli の issue をすべて見る
似ている issue
-
component:benchmark
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
agentic-os-org/ANOLISA#9177 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
distrochooser/distrochooser#520 ·
メンテナーはふだん 2 日以内に返信
-
Status: Needs confirmation Status: Needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
[BUG] Published Docker images lack the redis extra: HEADROOM_COMPRESS_SESSION_STORE stops startup対応中かも @AlessandroSpallina が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
headroomlabs-ai/headroom#4513 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
codespell-project/codespell#4060 ·
メンテナーはふだん 1 日以内に返信