You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/init.py in
1 """Brainsprite python API."""
----> 2 from .brainsprite import viewer_substitute
3
4 all = ['viewer_substitute']
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/brainsprite.py in
18 from nilearn.plotting.find_cuts import find_xyz_cut_coords
19 from nilearn.plotting.img_plotting import _load_anat
---> 20 from nilearn.reporting import HTMLDocument
21 from nilearn._utils.niimg_conversions import check_niimg_3d
22 from nilearn._utils.param_validation import check_threshold
ImportError: cannot import name 'HTMLDocument' from 'nilearn.reporting' (/Users/frkrohn/opt/anaconda3/lib/python3.9/site-packages/nilearn/reporting/init.py)
I am using Python 3.9.6 and a Jupyter in a conda environment
The text was updated successfully, but these errors were encountered:
Thanks a lot for the bug report. I believe it may relate to an update in nilearn, I am going to run tests on my end but would you mind sharing the version of your nilearn install?
yes, I can confirm (EDIT: that nilearn update is the cause of the problem). It is now necessary to import HTMLDocument from nilearn.plotting.html_document. I am going to fix the bug, bump up the dependency requirements and prepare a new release.
I tried the tutorials both as a Jupyter notebook and as a python script. When I tried executing the command
from brainsprite import viewer_substitute
bsprite = viewer_substitute(threshold=3, opacity=0.5, title="plot_stat_map",
cut_coords=[36, -27, 66])
bsprite.fit(stat_img, bg_img=anat)
I get the following error:
ImportError Traceback (most recent call last)
/var/folders/ck/szdm_4996pnb0qzqsb6pk4_r0000gp/T/ipykernel_67980/2301324209.py in
----> 1 from brainsprite import viewer_substitute
2
3 bsprite = viewer_substitute(threshold=3, opacity=0.5, title="plot_stat_map",
4 cut_coords=[36, -27, 66])
5 bsprite.fit(stat_img, bg_img=anat)
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/init.py in
1 """Brainsprite python API."""
----> 2 from .brainsprite import viewer_substitute
3
4 all = ['viewer_substitute']
~/opt/anaconda3/lib/python3.9/site-packages/brainsprite/brainsprite.py in
18 from nilearn.plotting.find_cuts import find_xyz_cut_coords
19 from nilearn.plotting.img_plotting import _load_anat
---> 20 from nilearn.reporting import HTMLDocument
21 from nilearn._utils.niimg_conversions import check_niimg_3d
22 from nilearn._utils.param_validation import check_threshold
ImportError: cannot import name 'HTMLDocument' from 'nilearn.reporting' (/Users/frkrohn/opt/anaconda3/lib/python3.9/site-packages/nilearn/reporting/init.py)
I am using Python 3.9.6 and a Jupyter in a conda environment
The text was updated successfully, but these errors were encountered: