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

dandi ls on bids .zarr directory name : 'NoneType' object has no attribute 'items' #1038

Closed
yarikoptic opened this issue Jun 30, 2022 · 5 comments · Fixed by #1164
Closed
Assignees

Comments

@yarikoptic
Copy link
Member

(git-annex)lena:~/proj/dandi/dandisets/000108[draft]git
$> DANDI_CACHE=ignore dandi ls sub-MITU01/ses-20210521h17m17s06/micr/sub-MITU01_ses-20210521h17m17s06_sample-178_stain-NN_run-1_chunk-1_SPIM.ome.zarr
- errors: 1
  path: sub-MITU01/ses-20210521h17m17s06/micr/sub-MITU01_ses-20210521h17m17s06_sample-178_stain-NN_run-1_chunk-1_SPIM.ome.zarr
2022-06-30 16:39:13,717 [ WARNING] Failed to operate on some paths (empty records were listed):
 AttributeError: 1 paths
2022-06-30 16:39:13,718 [    INFO] Logs saved in /home/yoh/.cache/dandi-cli/log/20220630203911Z-3420683.log

and in the log I see

2022-06-30T16:39:13-0400 [DEBUG   ] dandi 3420683:140027539093312 Failed to get metadata for sub-MITU01/ses-20210521h17m17s06/micr/sub-MITU01_ses-20210521h17m17s06_sample-178_stain-NN_run-1_chunk-1_SPIM.ome.zarr: No dandiset at sub-MITU01/ses-20210521h17m17s06/micr/sub-MITU01_ses-20210521h17m17s06_sample-178_stain-NN_run-1_chunk-1_SPIM.ome.zarr
2022-06-30T16:39:13-0400 [DEBUG   ] dandi 3420683:140027539093312 Problem obtaining metadata for sub-MITU01/ses-20210521h17m17s06/micr/sub-MITU01_ses-20210521h17m17s06_sample-178_stain-NN_run-1_chunk-1_SPIM.ome.zarr: 'NoneType' object has no attribute 'items'
@yarikoptic
Copy link
Member Author

ping on this issue -- remains as of 0.39.6+39.g8139966 of #1011

@TheChymera
Copy link
Contributor

The issue has evolved a bit since this was reported, sadly not towards a solution. ls seems all-round broken for BIDS and does not use the object logic that was recently introduced. Some refactoring is needed, probably best discussed/reviewed in the (currently draft) PR linked above.

TheChymera added a commit that referenced this issue Dec 5, 2022
@TheChymera
Copy link
Contributor

TheChymera commented Dec 5, 2022

@yarikoptic are you satisfied with this? efab43e (the fix being not just in that one commit, it's more the whole PR, but that commit tests it.)

@yarikoptic
Copy link
Member Author

looks ok, thanks!

Unrelated (I hope) issue although I do not see digest calculated for .nwb -- why do we seems to calculate (but not even output) digest for the .zarr -- any idea?

❯ dandi ls -f yaml micr_SEMzarr/sub-01/ses-01/micr/sub-01_ses-01_sample-A_SPIM.ome.zarr
2022-12-05 20:37:11,908 [    INFO] Calculating digest for micr_SEMzarr/sub-01/ses-01/micr/sub-01_ses-01_sample-A_SPIM.ome.zarr
2022-12-05 20:37:12,144 [ WARNING] BIDSVersion `1.7.0` is less than the minimal working `schema`. Falling back to `schema`. To force the usage of earlier versions specify them explicitly when calling the validator.
- age: null
  genotype: null
  identifier: '01'
  path: micr_SEMzarr/sub-01/ses-01/micr/sub-01_ses-01_sample-A_SPIM.ome.zarr
  sex: null
  species: null
2022-12-05 20:37:13,356 [    INFO] Logs saved in /home/yoh/.cache/dandi-cli/log/20221206013708Z-357541.log
dandi ls -f yaml   5.68s user 1.45s system 102% cpu 6.975 total

@TheChymera
Copy link
Contributor

I was unaware that we would ever want to display checksums in ls, we don't display them for non-zarr files either. I am pretty sure the digest computation is just an internal requirement of the function. @jwodder is that right, or should be outputting it somehow?

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