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

Docker NOT pulling latest version of code + ants_nibabel import error #41

Open
evieneylon98 opened this issue Feb 22, 2024 · 0 comments

Comments

@evieneylon98
Copy link

Hi!
I am experiencing some issues with running a quantitative analysis, and I hope you can provide some insights for me.

My command is as follows:

python3 /opt/APPIAN/Launcher.py --sub 000101 --ses baseline --user-ants-command /opt/APPIAN/src/ants_command_quick.txt -s INPUT -t OUTPUT --start-time 0.5 --filter --quant-method srtm --quant-label-space pet --quant-label-img reference_mask.nii.gz --quant-labels-ones-only

I get the following error:



Traceback (most recent call last):
File "/opt/APPIAN/Launcher.py", line 26, in
run_scan_level(opts,args)
File "/opt/APPIAN/src/scanLevel.py", line 34, in run_scan_level
scan_level_workflow.workflow.run()
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/engine/workflows.py", line 638, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/plugins/linear.py", line 82, in run
raise error from cause
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/plugins/linear.py", line 47, in run
node.run(updatehash=updatehash)
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/engine/nodes.py", line 521, in run
result = self._run_interface(execute=True)
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/engine/nodes.py", line 639, in _run_interface
return self._run_command(execute)
File "/usr/local/lib/python3.8/dist-packages/nipype/pipeline/engine/nodes.py", line 750, in _run_command
raise NodeExecutionError(
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node quant-srtm.

Traceback (most recent call last):
File "/opt/APPIAN/src/quantification.py", line 178, in srtm
isotope=header["Info"]["Tracer"]["Isotope"][0]
KeyError: 'Info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nipype/interfaces/base/core.py", line 398, in run
runtime = self._run_interface(runtime)
File "/opt/APPIAN/src/quantification.py", line 586, in _run_interface
quant_vol = model(pet_vol, int_vol, ref_tac_rsl, int_ref, time_frames, opts=opts, header=header)
File "/opt/APPIAN/src/quantification.py", line 184, in srtm
half_life = opts.quant_half_life
AttributeError: 'TraitDictObject' object has no attribute 'quant_half_life'


For some context, I am using APPIAN through Docker (tffunck/appian:latest).

I have tried to investigate why this error is occurring and I believe there is a discrepancy between the source code pulled in Docker and the latest source code on the GitHub website (where line 178 of quanitifcation.py is updated to reflect the actual JSON key name).

So, I decided to enter the container and from there checkout the latest commit to the master branch, dated Mar 8 2023. When I run my command again, I get "ModuleNotFoundError: No module named 'src.ants_nibabel'".

I have 3 main questions that I would ask for your input with:

  1. Why doesn't the Docker tffunck/appian:latest appear to pull the most up to date source code from the git repository?
  2. In the latest source code, is there a missing file ants_nibabel.py? Do you have any plans to add this file so the imports work correctly?
  3. I see that I could get around (1) by instead directly specifying the additional flag "--half-life 20.362". But this does not work either, because I get the error "AttributeError: 'TraitDictObject' object has no attribute 'quant_half_life'". Am I using this flag incorrectly?

I would very much appreciate your time in helping to resolve these issues.

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

No branches or pull requests

1 participant