coreg GUI problems persisting with conda env created following official install instructions

  • MNE version: 1.0.3
  • operating system: e.g. macOS 10.15.3

Recently, the conda environments I used to preprocess data all stopped being able to open GUIs for kit2fiff and coregistration. I followed the official install instructions to recreate an environment with all dependencies, but now when I try to load in a .fif file in the coregistration GUI, python crashes every time. Here is the traceback:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/viz/backends/_qt.py", line 314, in callback
    func(name)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 381, in _set_info_file
    self._info_file = _check_fname(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/traitlets/traitlets.py", line 715, in __set__
    self.set(obj, value)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/traitlets/traitlets.py", line 704, in set
    obj._notify_trait(self.name, old_value, new_value)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/traitlets/traitlets.py", line 1374, in _notify_trait
    self.notify_change(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/traitlets/traitlets.py", line 1386, in notify_change
    return self._notify_observers(change)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/traitlets/traitlets.py", line 1431, in _notify_observers
    c(event)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 606, in _info_file_changed
    self._reset()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 966, in _reset
    self.coreg.set_rotation(self.coreg._default_parameters[:3])
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/coreg.py", line 1597, in set_rotation
    self._update_params(rot=np.array(rot))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/coreg.py", line 1535, in _update_params
    self._nearest_calc.query(self._transformed_dig_eeg)[1]
  File "_ckdtree.pyx", line 794, in scipy.spatial._ckdtree.cKDTree.query
  File "_ckdtree.pyx", line 1619, in scipy.spatial._ckdtree.num_points
ValueError: x must consist of vectors of length 3 but has shape (0,)
Fatal Python error: Aborted

Thread 0x000070000d487000 (most recent call first):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 320 in wait
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/queue.py", line 171 in get
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 671 in _run_worker
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 946 in run
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1009 in _bootstrap_inner
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 966 in _bootstrap

Thread 0x000070000c484000 (most recent call first):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 320 in wait
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/queue.py", line 171 in get
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 671 in _run_worker
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 946 in run
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1009 in _bootstrap_inner
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 966 in _bootstrap

Current thread 0x000000010a757dc0 (most recent call first):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/viz/backends/_utils.py", line 188 in _qt_app_exec
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/_coreg.py", line 316 in __init__
  File "<decorator-gen-570>", line 12 in __init__
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/gui/__init__.py", line 193 in coregistration
  File "<decorator-gen-558>", line 12 in coregistration
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/commands/mne_coreg.py", line 85 in run
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/mne/commands/utils.py", line 107 in main
  File "/Library/Frameworks/Python.framework/Versions/3.10/bin/mne", line 8 in <module>

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, numpy.linalg.lapack_lite, vtkmodules.vtkCommonCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkCommonDataModel, vtkmodules.vtkCommonExecutionModel, vtkmodules.vtkCommonMisc, vtkmodules.vtkFiltersCore, vtkmodules.vtkFiltersGeneral, vtkmodules.vtkRenderingCore, vtkmodules.vtkRenderingContext2D, vtkmodules.vtkChartsCore, vtkmodules.vtkCommonColor, vtkmodules.vtkCommonComputationalGeometry, vtkmodules.vtkFiltersExtraction, vtkmodules.vtkFiltersFlowPaths, vtkmodules.vtkFiltersGeometry, vtkmodules.vtkFiltersHybrid, vtkmodules.vtkFiltersModeling, vtkmodules.vtkFiltersSources, vtkmodules.vtkFiltersTexture, vtkmodules.vtkParallelCore, vtkmodules.vtkFiltersParallel, vtkmodules.vtkFiltersPoints, vtkmodules.vtkFiltersStatistics, vtkmodules.vtkFiltersVerdict, vtkmodules.vtkIOEnSight, vtkmodules.vtkIOCore, vtkmodules.vtkIOLegacy, vtkmodules.vtkIOGeometry, vtkmodules.vtkImagingCore, vtkmodules.vtkIOImage, vtkmodules.vtkIOXMLParser, vtkmodules.vtkIOXML, vtkmodules.vtkIOInfovis, vtkmodules.vtkIOPLY, vtkmodules.vtkImagingGeneral, vtkmodules.vtkImagingHybrid, vtkmodules.vtkImagingMorphological, vtkmodules.vtkInteractionWidgets, vtkmodules.vtkPythonContext2D, vtkmodules.vtkRenderingAnnotation, vtkmodules.vtkRenderingFreeType, vtkmodules.vtkRenderingHyperTreeGrid, vtkmodules.vtkRenderingUI, vtkmodules.vtkRenderingOpenGL2, vtkmodules.vtkRenderingContextOpenGL2, vtkmodules.vtkImagingFourier, vtkmodules.vtkRenderingLabel, vtkmodules.vtkRenderingVolume, vtkmodules.vtkImagingMath, vtkmodules.vtkRenderingVolumeOpenGL2, vtkmodules.vtkViewsCore, vtkmodules.vtkViewsContext2D, psutil._psutil_osx, psutil._psutil_posix, PyQt5.QtCore, PyQt5.QtGui, PyQt5.QtWidgets, vtkmodules.vtkWebCore, vtkmodules.vtkRenderingSceneGraph, vtkmodules.vtkRenderingVtkJS, vtkmodules.vtkIOExport, vtkmodules.vtkWebGLExporter, vtkmodules.vtkInteractionStyle, vtkmodules.vtkViewsInfovis, vtkmodules.vtkCommonSystem, vtkmodules.vtkDomainsChemistry, vtkmodules.vtkTestingRendering, vtkmodules.vtkRenderingVolumeAMR, vtkmodules.vtkRenderingParallel, vtkmodules.vtkRenderingVR, vtkmodules.vtkRenderingMatplotlib, vtkmodules.vtkRenderingLOD, vtkmodules.vtkRenderingLICOpenGL2, vtkmodules.vtkRenderingImage, vtkmodules.vtkRenderingExternal, vtkmodules.vtkIOXdmf2, vtkmodules.vtkIOVeraOut, vtkmodules.vtkIOVPIC, vtkmodules.vtkIOTecplotTable, vtkmodules.vtkIOTRUCHAS, vtkmodules.vtkIOSegY, vtkmodules.vtkIOParallelXML, vtkmodules.vtkIOLSDyna, vtkmodules.vtkIOParallelLSDyna, vtkmodules.vtkIOExodus, vtkmodules.vtkIOParallelExodus, vtkmodules.vtkIOPIO, vtkmodules.vtkIOMovie, vtkmodules.vtkIOOggTheora, vtkmodules.vtkIOOMF, vtkmodules.vtkIONetCDF, vtkmodules.vtkIOMotionFX, vtkmodules.vtkIOParallel, vtkmodules.vtkIOMINC, vtkmodules.vtkIOImport, vtkmodules.vtkIOIOSS, vtkmodules.vtkIOH5part, vtkmodules.vtkIOH5Rage, vtkmodules.vtkIOGeoJSON, vtkmodules.vtkIOVideo, vtkmodules.vtkIOExportPDF, vtkmodules.vtkRenderingGL2PSOpenGL2, vtkmodules.vtkIOExportGL2PS, vtkmodules.vtkIOCityGML, vtkmodules.vtkIOChemistry, vtkmodules.vtkIOCesium3DTiles, vtkmodules.vtkIOCONVERGECFD, vtkmodules.vtkIOHDF, vtkmodules.vtkIOCGNSReader, vtkmodules.vtkIOAsynchronous, vtkmodules.vtkIOAMR, vtkmodules.vtkInteractionImage, vtkmodules.vtkImagingStencil, vtkmodules.vtkImagingStatistics, vtkmodules.vtkImagingOpenGL2, vtkmodules.vtkIOSQL, vtkmodules.vtkImagingSources, vtkmodules.vtkInfovisCore, vtkmodules.vtkGeovisCore, vtkmodules.vtkInfovisLayout, vtkmodules.vtkImagingColor, vtkmodules.vtkFiltersTopology, vtkmodules.vtkFiltersSelection, vtkmodules.vtkFiltersSMP, vtkmodules.vtkFiltersPython, vtkmodules.vtkFiltersProgrammable, vtkmodules.vtkFiltersParallelStatistics, vtkmodules.vtkFiltersImaging, vtkmodules.vtkFiltersParallelImaging, vtkmodules.vtkFiltersParallelDIY2, vtkmodules.vtkFiltersGeneric, vtkmodules.vtkFiltersAMR, vtkmodules.vtkDomainsChemistryOpenGL2, vtkmodules.vtkFiltersHyperTree, vtkmodules.vtkCommonPython, vtkmodules.vtkAcceleratorsVTKmCore, vtkmodules.vtkAcceleratorsVTKmDataModel, vtkmodules.vtkAcceleratorsVTKmFilters, scipy._lib._ccallback_c, scipy.sparse._sparsetools, scipy.sparse._csparsetools, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.spatial._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg._cythonized_array_utils, scipy.linalg._flinalg, scipy.linalg._solve_toeplitz, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg.cython_lapack, scipy.linalg._decomp_update, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.special._ufuncs_cxx, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, scipy.spatial.transform._rotation, matplotlib._c_internal_utils, PIL._imaging, matplotlib._path, kiwisolver._cext (total: 188)
Abort trap: 6

Hello @jj3479, the trackback seems to indicate that you are actually not using a conda environment, but a “normal” global Python installation without a virtual environment.

If you’re having trouble with conda, you may also try out our official standalone installers that should come with everything you need.

Best wishes,
Richard

1 Like