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

Tracking issue : TypeError: 'NoneType' object is not subscriptable #246

Open
clemjeancmj opened this issue Jul 24, 2023 · 2 comments
Open

Comments

@clemjeancmj
Copy link

Hi everyone !

I managed to produce TOM but I've some difficulties when I try to perform the tracking step :

(base) clementjean@MacBook-Pro DWI % Tracking -i peaks.nii.gz
0%| | 0/72 [00:03<?, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/clementjean/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/Users/clementjean/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/Users/clementjean/opt/anaconda3/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 157, in process_seedpoint
streamline_part1, length_1 = process_one_way(peaks, streamline1, max_nr_steps, step_size, probabilistic,
File "/Users/clementjean/opt/anaconda3/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 52, in process_one_way
dir_raw = get_at_idx(peaks, (last_point[0], last_point[1], last_point[2]))
File "/Users/clementjean/opt/anaconda3/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 43, in get_at_idx
return img[int(idx[0]), int(idx[1]), int(idx[2])]
TypeError: 'NoneType' object is not subscriptable
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/clementjean/opt/anaconda3/bin/Tracking", line 168, in
main()
File "/Users/clementjean/opt/anaconda3/bin/Tracking", line 158, in main
tracking.track(bundle, input_path, Config.PREDICT_IMG_OUTPUT,
File "/Users/clementjean/opt/anaconda3/lib/python3.8/site-packages/tractseg/libs/tracking.py", line 220, in track
streamlines = tractseg_prob_tracking.track(tom_peaks, max_nr_fibers=nr_fibers, smooth=5,
File "/Users/clementjean/opt/anaconda3/lib/python3.8/site-packages/tractseg/libs/tractseg_prob_tracking.py", line 263, in track
streamlines_tmp = pool.map(partial(process_seedpoint, next_step_displacement_std=next_step_displacement_std,
File "/Users/clementjean/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/Users/clementjean/opt/anaconda3/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
TypeError: 'NoneType' object is not subscriptable

Can someone help me ?
Thanks

@MeaghanPerdue
Copy link

Hello,
I am running into the same error, have you found a solution yet?

Thank you!
Meaghan

@Laamoumi
Copy link

Following the steps described here helped me resolve this error.

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