missing .afni/help/all_progs.COMP in check up

New to AFNI. I install AFNI on Win11 WSL2(ubuntu 20.04) following the instructions 1.13 'Quick Setup" and run evaluation/check up "afni_system_check.py -check_all" in a new terminal session, however a error occurs:

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

    .afnirc                   : found
    .sumarc                   : found
    .afni/help/all_progs.COMP : missing

--------- shell startup files ----------
Traceback (most recent call last):
  File "/home/user/abin/afni_system_check.py", line 676, in <module>
    sys.exit(main())
  File "/home/user/abin/afni_system_check.py", line 670, in main
    rv = me.execute()
  File "/home/user/abin/afni_system_check.py", line 652, in execute
    if self.sys_check: self.show_system_info()
  File "/home/user/abin/afni_system_check.py", line 577, in show_system_info
    self.sinfo.show_all_sys_info()
  File "/home/user/abin/afnipy/lib_system_check.py", line 2065, in show_all_sys_info
    self.show_dot_file_check()
  File "/home/user/abin/afnipy/lib_system_check.py", line 1309, in show_dot_file_check
    cmd = 'init_user_dotfiles.py -test -shell_list %s' % ' '.join(shell_list)
TypeError: sequence item 1: expected str instance, NoneType found

The message I understand is a ".afni/help/all_progs.COMP" file is missing and then the check program fails.
But when I try to type "afni" and "suma" in termeinal, and the GUI runs normally without additional abnormal message.

If anyone could tell me, do I need to re-install AFNI in a 'slow-setup' way, or the error message ".afni/help/all_progs.COMP:missing" in evaluation/check up is not as important?

Howdy-

The missing all_progs file shouldn't be catastrophic here---that is something that will be created by running:

apsearch -update_all_afni_help

... which is done automatically with @update.afni.binaries, I believe, and can always be done later. That sets up the system for the nice functionality of autocompleting options when typing AFNI commands on the terminal.

We do have some setup instructions that start with WSL notes:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_windows10.html#id2
... and typically, we have recommended users use WSL1 instead of WSL2, because the latter had caused some woe at times (hence the " Click here to install WSL 1 (noooot WSL 2)") note there). But that being said, at a recent AFNI Bootcamp, I think things went fine with WSL2 setup. So let's try to see what is happening with this start.

Firstly, did you go through that page of WSL installation notes, to add the pieces there, before getting to the AFNI parts? There are some key items like installing a separate server (like VcXsrv, linked there) that are needed to allow GUIs to popup, etc.

And perhaps could you please copy+paste the full output of this (of which you have shown a bit above):

afni_system_check.py -check_all

? That might help shed clues on any missing dependencies.

--pt

edit: asking for 2 commands now

The error suggests there is something in the way your system reports running processes that the program is not prepared for.

Would you also please report the output from running:

afni_python_wrapper.py -eval "show_process_stack(verb=2)"
afni_python_wrapper.py -print  "get_process_stack()"

Thanks,

  • rick

Thanks for your reply! I actually didn't notice the requirements of WSL version, which maybe the origin of this error.
Here is my full output of "afni_system_check.py -check_all"

-------------------------------- general ---------------------------------
architecture: 64bit ELF
cpu type: x86_64
system: Linux
release: 5.15.146.1-microsoft-standard-WSL2
version: #1 SMP Thu Jan 11 04:09:03 UTC 2024
distribution: ubuntu 20.04 focal
number of CPUs: 16
** GPSS command failure for: ps h -o pid,ppid,user,comm -p 0

error output:
error: process ID out of range

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).
** cannot detect shell: empty process stack
** GPSS command failure for: ps h -o pid,ppid,user,comm -p 0

error output:
error: process ID out of range

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).
** cannot detect shell: empty process stack
apparent login shell: None
shell RC file: NONE (does not exist)

--------------------- AFNI and related program tests ---------------------
which afni : /home/hanyu/abin/afni
afni version : Precompiled binary linux_ubuntu_16_64: Jan 25 2024
: AFNI_24.0.02 'Caracalla'
AFNI_version.txt : AFNI_24.0.02, linux_ubuntu_16_64, Jan 25 2024, official
which python : /usr/bin/python
python version : 3.8.10
which R : /usr/bin/R
R version : R version 4.3.2 (x86_64-pc-linux-gnu)

instances of various programs found in PATH:
afni : 1 (/home/hanyu/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.8)
python2 : 1 (/usr/bin/python2.7)
python3 : 1 (/usr/bin/python3.8)

testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
uber_subject.py : success
3dMVM : success

------------------------ dependent program tests -------------------------
checking for dependent programs...

which tcsh : /usr/bin/tcsh
which Xvfb : /usr/bin/Xvfb

checking for R packages...
rPkgsInstall -pkgs ALL -check : success

R RHOME : /usr/lib/R

------------------------------ python libs -------------------------------

++ module loaded: matplotlib.pyplot
module file : /home/hanyu/.local/lib/python3.8/site-packages/matplotlib/pyplot.py
matplotlib version : 3.7.4

++ module loaded: flask
module file : /usr/lib/python3/dist-packages/flask/init.py
flask version : 1.1.1

++ module loaded: flask_cors
module file : /usr/lib/python3/dist-packages/flask_cors/init.py
flask_cors version : 3.0.8

-------------------------------- env vars --------------------------------
PATH = /usr/local/fsl/bin:/home/hanyu/.local/bin:/usr/local/bxh_xcede_tools-1.11.14-lsb30.x86_64/bin:/usr/local/go/bin:/usr/local/c3d-1.0.0-Linux-x86_64/bin:/usr/local/freesurfer/7.3.2/bin:/usr/local/go/bin:/opt/ANTs/bin:/usr/local/elastix-5.0.1-linux/bin:/usr/local/fsl/bin:/usr/local/cuda/bin:/home/hanyu/miniconda3/condabin:/home/hanyu/Packages/ANTs/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Users/hy/Miniconda3:/mnt/c/Users/hy/Miniconda3/Library/bin:/mnt/c/Users/hy/Miniconda3/Scripts:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4:/mnt/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64:/mnt/c/Program Files/NVIDIA Corporation/Nsight Compute 2020.2.1/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/MATLAB/R2021b/runtime/win64:/mnt/c/Program Files/MATLAB/R2021b/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/CMake/bin:/mnt/c/Program Files/Java/jdk-18.0.2/bin:/mnt/c/Users/hy/Miniconda3/envs/bayes/Scripts/Fiji.app:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64:/mnt/c/Users/hy/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/PyCharm 2020.1/bin:/mnt/c/Users/hy/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/hanyu/go/bin:/home/hanyu/abin

PYTHONPATH =
R_LIBS = /home/hanyu/R

LD_LIBRARY_PATH = /usr/local/elastix-5.0.1-linux/lib:/usr/local/cuda/lib64:

DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

----------------------------- eval dot files -----------------------------

----------- AFNI $HOME files -----------

.afnirc                   : found
.sumarc                   : found
.afni/help/all_progs.COMP : missing

--------- shell startup files ----------
Traceback (most recent call last):
File "/home/hanyu/abin/afni_system_check.py", line 676, in
sys.exit(main())
File "/home/hanyu/abin/afni_system_check.py", line 670, in main
rv = me.execute()
File "/home/hanyu/abin/afni_system_check.py", line 652, in execute
if self.sys_check: self.show_system_info()
File "/home/hanyu/abin/afni_system_check.py", line 577, in show_system_info
self.sinfo.show_all_sys_info()
File "/home/hanyu/abin/afnipy/lib_system_check.py", line 2065, in show_all_sys_info
self.show_dot_file_check()
File "/home/hanyu/abin/afnipy/lib_system_check.py", line 1309, in show_dot_file_check
cmd = 'init_user_dotfiles.py -test -shell_list %s' % ' '.join(shell_list)
TypeError: sequence item 1: expected str instance, NoneType found

Fine.

Output of afni_python_wrapper.py -eval "show_process_stack(verb=2)" is here:
'''
** GPS pid 0 not in pid list:

[['1', '0', 'root', '/lib/systemd/systemd', '--unit=basic.target'], ['42', '1', 'root', '/lib/systemd/systemd-journald'], ['65', '1', 'root', '/lib/systemd/systemd-udevd'], ['68', '1', 'systemd+', '/lib/systemd/systemd-networkd'], ['243', '1', 'root', 'snapfuse', '/var/lib/snapd/snaps/lxd_24061.snap', '/snap/lxd/24061', '-o', 'ro,nodev,allow_other,suid'], ['249', '1', 'message+', '/usr/bin/dbus-daemon', '--system', '--address=systemd:', '--nofork', '--nopidfile', '--systemd-activation', '--syslog-only'], ['250', '1', 'root', '/usr/sbin/NetworkManager', '--no-daemon'], ['318', '0', 'root', '/usr/bin/sudo', '-H', '-u', 'hanyu', '/bin/bash', '-c', 'set', '-a;', '[', '-f', '"$HOME/.systemd-env"', ']', '&&', 'source', '"$HOME/.systemd-env";', 'set', '+a;', 'exec', 'bash', '-c', 'sh\', '-c\', '\'\"\$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh\"\', 'f1b07bd25dfad64b0167beb15359ae573aecd2cc\', 'stable\', 'code-server\', '.vscode-server\', '--host=127.0.0.1\', '--port=0\', '--connection-token=2643755491-3678993965-1761600367-607173443\', '--use-host-proxy\', '--without-browser-env-var\', '--disable-websocket-compression\', '--accept-server-license-terms\', '--disable-telemetry\', "--telemetry-level=off\'"], ['319', '318', 'hanyu', 'sh', '-c', '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh"', 'f1b07bd25dfad64b0167beb15359ae573aecd2cc', 'stable', 'code-server', '.vscode-server', '--host=127.0.0.1', '--port=0', '--connection-token=2643755491-3678993965-1761600367-607173443', '--use-host-proxy', '--without-browser-env-var', '--disable-websocket-compression', '--accept-server-license-terms', '--disable-telemetry', '--telemetry-level=off'], ['320', '319', 'hanyu', 'sh', '/mnt/c/Users/hy/.vscode/extensions/ms-vscode-remote.remote-wsl-0.72.0/scripts/wslServer.sh', 'f1b07bd25dfad64b0167beb15359ae573aecd2cc', 'stable', 'code-server', '.vscode-server', '--host=127.0.0.1', '--port=0', '--connection-token=2643755491-3678993965-1761600367-607173443', '--use-host-proxy', '--without-browser-env-var', '--disable-websocket-compression', '--accept-server-license-terms', '--disable-telemetry', '--telemetry-level=off'], ['325', '320', 'hanyu', 'sh', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/bin/code-server', '--host=127.0.0.1', '--port=0', '--connection-token=2643755491-3678993965-1761600367-607173443', '--use-host-proxy', '--without-browser-env-var', '--disable-websocket-compression', '--accept-server-license-terms', '--disable-telemetry', '--telemetry-level=off'], ['329', '325', 'hanyu', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/out/server-main.js', '--host=127.0.0.1', '--port=0', '--connection-token=2643755491-3678993965-1761600367-607173443', '--use-host-proxy', '--without-browser-env-var', '--disable-websocket-compression', '--accept-server-license-terms', '--disable-telemetry', '--telemetry-level=off'], ['368', '329', 'hanyu', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/out/bootstrap-fork', '--type=fileWatcher'], ['429', '329', 'hanyu', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node', '--dns-result-order=ipv4first', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/out/bootstrap-fork', '--type=extensionHost', '--transformURIs', '--useHostProxy=true'], ['521', '429', 'hanyu', '/home/hanyu/miniconda3/envs/bayes/bin/python', '/home/hanyu/.vscode-server/extensions/ms-python.isort-2022.8.0/bundled/tool/server.py'], ['560', '429', 'hanyu', '/home/hanyu/.vscode-server/bin/f1b07bd25dfad64b0167beb15359ae573aecd2cc/node', '/home/hanyu/.vscode-server/extensions/ms-python.vscode-pylance-2022.12.20/dist/server.bundle.js', '--cancellationReceive=file:01deb0d267feb99772e07bc85a0dfbc196dd8c8aac', '--node-ipc', '--clientProcessId=429'], ['882', '1', 'root', '/lib/systemd/systemd-logind'], ['1135', '1', 'root', '/usr/lib/policykit-1/polkitd', '--no-debug'], ['13816', '0', 'root', '/bin/login', '-p', '-f', "'DISPLAY=:0'", "'HOSTTYPE=x86_64'", "'PULSE_SERVER=unix:/mnt/wslg/PulseServer'", "'PWD=/home/hanyu'", "'TERM=xterm-256color'", "'WAYLAND_DISPLAY=wayland-0'", "'WSL2_GUI_APPS_ENABLED=1'", "'WSLENV=WT_SESSION:WT_PROFILE_ID:BASH_ENV/u'", "'WSL_DISTRO_NAME=Ubuntu-20.04'", "'WSL_INTEROP=/run/WSL/13875_interop'", "'WSL_PAC_URL=http://127.0.0.1:10812/pac?t=638423825047575671'", "'WT_PROFILE_ID={07b52e3e-de2c-5db4-bd2d-ba144ed6c273}'", "'WT_SESSION=676da409-3531-4bae-87b1-4d30529a9080'", "'XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir'"], ['13935', '1', 'hanyu', '/lib/systemd/systemd', '--user'], ['13937', '13935', 'hanyu', '(sd-pam)'], ['13943', '13935', 'hanyu', '/usr/bin/pulseaudio', '--daemonize=no', '--log-target=journal'], ['13945', '13935', 'hanyu', '/usr/libexec/tracker-miner-fs'], ['13946', '13816', 'hanyu', '-bash'], ['13956', '13935', 'hanyu', '/usr/bin/dbus-daemon', '--session', '--address=systemd:', '--nofork', '--nopidfile', '--systemd-activation', '--syslog-only'], ['13959', '1', 'rtkit', '/usr/libexec/rtkit-daemon'], ['13973', '13935', 'hanyu', '/usr/libexec/gvfsd'], ['13989', '13935', 'hanyu', '/usr/libexec/gvfs-udisks2-volume-monitor'], ['13992', '1', 'root', '/usr/lib/udisks2/udisksd'], ['14013', '13935', 'hanyu', '/usr/libexec/gvfs-goa-volume-monitor'], ['14017', '13935', 'hanyu', '/usr/libexec/goa-daemon'], ['14026', '13935', 'hanyu', '/usr/libexec/goa-identity-service'], ['14031', '13935', 'hanyu', '/usr/libexec/gvfs-afc-volume-monitor'], ['14038', '13935', 'hanyu', '/usr/libexec/gvfs-mtp-volume-monitor'], ['14042', '13935', 'hanyu', '/usr/libexec/gvfs-gphoto2-volume-monitor'], ['14048', '1', 'root', '/usr/lib/upower/upowerd'], ['14094', '13935', 'hanyu', '/usr/libexec/gvfsd-metadata'], ['23103', '13946', 'hanyu', 'python', '/home/hanyu/abin/afni_python_wrapper.py', '-eval', 'show_process_stack(verb=2)'], ['23104', '23103', 'hanyu', '/bin/sh', '-c', 'ps', '-eo', 'pid,ppid,user,args'], ['23105', '23104', 'hanyu', 'ps', '-eo', 'pid,ppid,user,args']]
** GPSS command failure for: ps h -o pid,ppid,user,comm -p 0

error output:
error: process ID out of range

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).
** empty process stack
'''

and output of afni_python_wrapper.py -print "get_process_stack()":
** GPSS command failure for: ps h -o pid,ppid,user,comm -p 0

error output:
error: process ID out of range

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).

Very much thanks!
I think the simplest way (for me) to solve this may be change to WSL1 and re-install afni, however the GUI works normally. As a beginner, I'm going to learn to use afni GUI regardless of this error message. If new error occurs I will re-install WSL & afni at that time.

Very much thanks!
I found that the output show the error "process ID out of range", maybe I run the command in a false way (or maybe some environment configs?)

It seems to me that some part of the ps or python's os.getpid() works differently than expected. Would you please post the output from just:

python -c 'import os; print(os.getpid())'

I am wondering if that is returning 0 or something.

Either way, it is not quite clear to me what the error is, but it does not seem to be anything that you are doing. Hopefully we can prevent this error from happening in the future. Can you verify the output of that python command?

Thanks,

  • rick