Closed nickwell13 closed 2 years ago
Will probably just need to implement and adjust locally: https://github.com/nipy/heudiconv/blob/80713f8e2a4e0f25e40eaed28cc5a9ed0c3b5ac9/heudiconv/utils.py#L27-L53
Implement how exactly? Add the highlighted section to my script?
Ignore, just a comment for myself, a fix is in the works
Awesome. Thanks.
@nickwell13 this should be updated on flywheel now, you can also update your local copy by downloading the latest version from pip pip install -U fw-heudiconv
When running fw-heudiconv-tabulate I receive the same 'time' error. When running fw-heudiconv-curate I receive the error that "module 'collections' has no attribute 'MutableMapping'". Here is the full error message:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/fw-heudiconv-curate", line 8, in
could you do pip show fw-heudiconv
Name: fw-heudiconv Version: 0.4.3 Summary: Use heudiconv-like heuristics for BIDS curation on flywheel Home-page: https://github.com/PennBBL/fw_heudiconv Author: Tinashe M. Tapera, Matt Cieslak, Harsha Kethineni Author-email: tinashemtapera@gmail.com License: 3-clause BSD Location: /Users/nickwell/Library/Python/2.7/lib/python/site-packages Requires: bids-validator, pathvalidate, flywheel-sdk, nibabel, pytest, pytest-cov, validators, pandas, heudiconv
hmmm..... I'm not sure I like this Location: /Users/nickwell/Library/Python/2.7/lib/python/site-packages
Could you create a new environment with conda with specifically python 3.7 and reinstall fwheudiconv there?
Tried this. I'm now receive "fw-heudiconv-curate: Command not found" within as well as outside of my conda environment. fw status shows I'm logged into fw CLI and I've upgraded to the most recent version of fw sdk. It shows up if I do "pip show fw-heudiconv": Name: fw-heudiconv Version: 0.4.3 Summary: Use heudiconv-like heuristics for BIDS curation on flywheel Home-page: https://github.com/PennBBL/fw_heudiconv Author: Tinashe M. Tapera, Matt Cieslak, Harsha Kethineni Author-email: tinashemtapera@gmail.com License: 3-clause BSD Location: /Users/nickwell/opt/miniconda3/envs/flywheel3.7/lib/python3.7/site-packages Requires: nibabel, flywheel-sdk, bids-validator, heudiconv, pytest-cov, validators, pandas, pytest, pathvalidate
TBH you might wanna nuke your conda and start over if possible... I have a feeling something broke outside of the scope of this fwheudiconv issue https://docs.anaconda.com/anaconda/install/uninstall/
That did the trick! Thanks so much for the help.
Love to see it
Describe the issue A clear and concise description of what the challenge is.
Received error: TypeError: SeqInfo.new() missing 1 required positional argument: 'time'. This occurred when attempting heudiconv-curate and heudiconv-tabulate from the cli. I was told to downgrade my heudiconv version but this did not help.
Were you running
fw-heudiconv
locally or from Flywheel's GUI?[x] Locally
[ ] GUI
If you ran it locally, please describe your setup:
Mac OS Catalina through CLI.
pip show fw-heudiconv
]Tried this with 0.8, then downgraded until 0.4 and the issue persisted.
Please paste your heuristic below:
import os
################################################################################# #################### Create keys for each acquisition type #################### #################################################################################
def create_key(template, outtype=('nii.gz',), annotation_classes=None): if template is None or not template: raise ValueError('Template must be a valid format string') return template, outtype, annotation_classes
anat
t1w = create_key( 'sub-{subject}/ses-{session}/anat/sub-{subject}_ses-{session}_T1w') t1w_ND = create_key( 'sub-{subject}/ses-{session}/anat/sub-{subject}_ses-{session}_T1w_SC')
dwi
dwi = create_key( 'sub-{subject}/ses-{session}/dwi/sub-{subject}_ses-{session}_dwi')
fmap
b0_phase1 = createkey( 'sub-{subject}/{session}/fmap/sub-{subject}{session}_phase1') b0_phase2 = createkey( 'sub-{subject}/{session}/fmap/sub-{subject}{session}_phase2')
b0_mag = create_key(
'sub-{subject}/{session}/fmap/sub-{subject}_{session}_magnitude{item}')
b0_mag1 = createkey( 'sub-{subject}/{session}/fmap/sub-{subject}{session}_magnitude1') b0_mag2 = createkey( 'sub-{subject}/{session}/fmap/sub-{subject}{session}_magnitude2')
################################################################################# ########### Define rules to map scans to the correct BIDS filename ############ #################################################################################
Institution name: PENN - HUP; NEUM - MPI for Human Development; UTMB - UTMB 3T SKYRA
def infotodict(seqinfo): """Heuristic evaluator for determining which runs belong where allowed template fields - follow python string module: item: index within category subject: participant id seqitem: run number during scanning subindex: sub index within group """
Please paste any relevant output below
INFO: Applying heuristic to T12 (1/102)... Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/bin/fw-heudiconv-curate", line 8, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fw_heudiconv/cli/curate.py", line 326, in main
convert_to_bids(client=fw,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fw_heudiconv/cli/curate.py", line 185, in convert_to_bids
seq_infos = get_seq_info(client, project_label, [session])
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fw_heudiconv/backend_funcs/query.py", line 176, in get_seq_info
for key, val in session_to_seq_info(client, session, context).items():
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fw_heudiconv/backend_funcs/query.py", line 115, in session_to_seq_info
for info in acquisition_to_heudiconv(client, acquisition, context):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fw_heudiconv/backend_funcs/query.py", line 60, in acquisition_to_heudiconv
to_convert.append(utils.SeqInfo(
TypeError: SeqInfo.new() missing 1 required positional argument: 'time'
Add any additional context or information below