I'm trying to plot a cluster from a spatiotemporal cluster-based permutation test. Everything's working fine, until I try to use eelbrian.plot.brain.cluster, in which case I get an error saying that init() takes exactly one argument. I get this error if I just try to plot a brain using eelbrain.plot.brain.brain('fsaverage'), traceback below. I've had this issue with eelbrain 0.38.4 and 0.38.6, and I'm running this on Python 3.10 on Mac OS Monterey.
I've also tried to (re)install pysurfer. My MNE environment is able to render Brain objects fine in an ipython environment, and also in an eelbrain environment. So there's something happening specifically with eelbrain functions. Any ideas what's going on?
2023-05-04 19:27:13.917 python[27564:826284] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/mr/79qm2pcs3f76pkqdnd_pwfzml0x6yh/T/com.continuum.python.savedState
Installed eelbrain event loop hook.
<frozen importlib._bootstrap>:241: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 96 from PyObject
/Users/dac49596/anaconda3/envs/eelbrain0386/lib/python3.10/site-packages/eelbrain/plot/_brain_object.py:49: UserWarning: Error importing PySurfer: cannot import name 'Sequence' from 'collections' (/Users/dac49596/anaconda3/envs/eelbrain0386/lib/python3.10/collections/__init__.py)
warn(f"Error importing PySurfer: {exception}")
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 eelbrain.plot.brain.brain('fsaverage')
File ~/anaconda3/envs/eelbrain0386/lib/python3.10/site-packages/eelbrain/plot/_brain.py:562, in brain(src, cmap, vmin, vmax, surf, views, hemi, colorbar, time_label, w, h, axw, axh, foreground, background, parallel, cortex, title, smoothing_steps, mask, subjects_dir, name, pos)
559 if subjects_dir is None:
560 subjects_dir = source.subjects_dir
--> 562 brain = Brain(subject, hemi, surf, title, cortex, views=views, w=w, h=h, axw=axw, axh=axh, foreground=foreground, background=background, subjects_dir=subjects_dir, name=name, pos=pos, source_space=source)
564 if ndvar is not None:
565 if ndvar.x.dtype.kind in 'ui':
File ~/anaconda3/envs/eelbrain0386/lib/python3.10/site-packages/eelbrain/plot/_brain_object.py:240, in Brain.__init__(self, subject, hemi, surf, title, cortex, alpha, background, foreground, subjects_dir, views, offset, show_toolbar, offscreen, interaction, w, h, axw, axh, name, pos, source_space, show, run)
238 if subjects_dir is not None:
239 subjects_dir = os.path.expanduser(subjects_dir)
--> 240 surfer.Brain.__init__(self, subject, hemi, surf, '', cortex, alpha, (w, h), background, foreground, figure, subjects_dir, views, offset, show_toolbar, offscreen, interaction)
241 TimeSlicer.__init__(self)
243 if self._frame and CONFIG['show'] and show:
TypeError: object.__init__() takes exactly one argument (the instance to initialize)