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

Getting AFNI version in a simpler way #3552

Open
mrneont opened this issue Mar 23, 2023 · 3 comments
Open

Getting AFNI version in a simpler way #3552

mrneont opened this issue Mar 23, 2023 · 3 comments

Comments

@mrneont
Copy link

mrneont commented Mar 23, 2023

Summary

Avoid crashes due to AFNI version parsing, by using a better option to get the version number directly.

Actual behavior

afni --version in nipype/interfaces/afni/base.py gives a complicated string (Precompiled binary linux_ubuntu_16_64_glw_local_shared: Mar 23 2023 (Version AFNI_23.0.07 'Commodus')), that parse_version(raw_info) in the same file doesn't appear to always parse correctly.

Expected behavior

afni -vnum would just give the version in the format AFNI_23.0.07, which could be simply parsed for just the numerical-with-dots part. It should also be platform independent.

How to replicate the behavior

Current behavior apparently causes a crash in MRIQC: nipreps/mriqc#1087

Script/Workflow details

Please put URL to code or code here (if not too long).

Platform details:


Execution environment

Choose one

  • Container [Tag: ???]
  • My python environment inside container [Base Tag: ???]
  • My python environment outside container
@effigies
Copy link
Member

Thanks, Paul, that's really handy. I guess we need a try/catch, because if I try that with the latest available on NeuroDebian:

$ afni -vnum
Precompiled binary Debian-x86_64-1-gnu: May 17 2018 (Version Debian-18.0.05+git24-gb25b21054~dfsg.1-1~nd17.10+1+nd18.04+1)

Thanks go to S Japee for caloric input

Initializing: X11Error: Can't open display: 
++ AFNI is detached from terminal.

I suspect what's going on with that user is that they've patched /usr/bin into their singularity container and are running into either a FileNotFound or a dynamic linking failure.

@afni-rickr
Copy link

That is a complication. Paul added that -vnum option in Oct 2019, after that Debian version was released.

@mrneont
Copy link
Author

mrneont commented Mar 23, 2023

Ah, indeed. May, 2018 seems like so long ago...

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

3 participants