Closed matsvanes closed 9 months ago
This should be handled in the environment files. I would reinstall following the instruction on the github homepage readme and see if this problem still occurs.
I reinstalled osl and got a different (but related) error, regarding the 3D backend. I was running the code in VSCode, and I didn't get the issue in the terminal. So this is likely VSCode related (beware!)
The error I got after reinstallation:
OSL osl_logger: handler 'console' level set to 'INFO'
logging to file: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/logs/osl_batch.log
Starting OSL Batch Source Reconstruction
Running config
{'source_recon': [{'extract_fiducials_from_fif': {}},
{'fix_headshape_points': {}},
{'custom_coregister': {}}]}
C1013_resting_open_bl_tsss_preproc_raw : OSL osl_logger: handler 'console' level set to 'INFO'
C1013_resting_open_bl_tsss_preproc_raw : logging to file: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/logs/C1013_resting_open_bl_tsss_preproc_raw_src.log
C1013_resting_open_bl_tsss_preproc_raw : 2023-10-31 13:11:58 : Starting OSL Processing
C1013_resting_open_bl_tsss_preproc_raw : input : /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl
C1013_resting_open_bl_tsss_preproc_raw : Setting up polhemus files
C1013_resting_open_bl_tsss_preproc_raw : saved: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_headshape.txt
C1013_resting_open_bl_tsss_preproc_raw : saved: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_nasion.txt
C1013_resting_open_bl_tsss_preproc_raw : saved: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_rpa.txt
C1013_resting_open_bl_tsss_preproc_raw : saved: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_lpa.txt
C1013_resting_open_bl_tsss_preproc_raw : overwritting /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_headshape.txt
C1013_resting_open_bl_tsss_preproc_raw : *** OSL RHINO: USING PREVIOUSLY COMPUTED SURFACES ***
C1013_resting_open_bl_tsss_preproc_raw : Surfaces directory: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/surfaces
C1013_resting_open_bl_tsss_preproc_raw : include_nose=True
C1013_resting_open_bl_tsss_preproc_raw : *** RUNNING OSL RHINO COREGISTRATION ***
C1013_resting_open_bl_tsss_preproc_raw : The MRI-derived nose is going to be used to aid coreg.
C1013_resting_open_bl_tsss_preproc_raw : Please ensure that rhino.compute_surfaces was run with include_nose=True.
C1013_resting_open_bl_tsss_preproc_raw : Please ensure that the polhemus headshape points include the nose.
C1013_resting_open_bl_tsss_preproc_raw : loading: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_headshape.txt
C1013_resting_open_bl_tsss_preproc_raw : loading: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_nasion.txt
C1013_resting_open_bl_tsss_preproc_raw : loading: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_rpa.txt
C1013_resting_open_bl_tsss_preproc_raw : loading: /ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/C1013_resting_open_bl/rhino/coreg/polhemus_lpa.txt
C1013_resting_open_bl_tsss_preproc_raw : Running ICP...
C1013_resting_open_bl_tsss_preproc_raw : ICP found better xform, error=2.7041529319876356
C1013_resting_open_bl_tsss_preproc_raw : rhino.coreg_display("/ohba/pi/mwoolrich/mvanes/Projects/NTAD/source", "C1013_resting_open_bl") can be used to check the result
C1013_resting_open_bl_tsss_preproc_raw : *** OSL RHINO COREGISTRATION COMPLETE ***
C1013_resting_open_bl_tsss_preproc_raw : *********************************
C1013_resting_open_bl_tsss_preproc_raw : * SOURCE RECONSTRUCTION FAILED! *
C1013_resting_open_bl_tsss_preproc_raw : *********************************
C1013_resting_open_bl_tsss_preproc_raw : custom_coregister : <function custom_coregister at 0x7f0cee06c5e0>
C1013_resting_open_bl_tsss_preproc_raw : <class 'ImportError'>
C1013_resting_open_bl_tsss_preproc_raw : Initialization failed for vtkWebCore, not compatible with vtkmodules.vtkCommonCore
C1013_resting_open_bl_tsss_preproc_raw : None
OSL osl_logger: handler 'console' level set to 'INFO'
logging to file: [/ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/logs/osl_batch.log](https://vscode-remote+ssh-002dremote-002bhbaws46.vscode-resource.vscode-cdn.net/ohba/pi/mwoolrich/mvanes/Projects/NTAD/source/logs/osl_batch.log)
Processed 0/1 files successfully
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/osl/source_recon/batch.py", line 183, in run_src_chain
File "<ipython-input-1-26cd8658adc8>", line 182, in custom_coregister
source_recon.wrappers.coregister(
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/osl/source_recon/wrappers.py", line 194, in coregister
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/osl/source_recon/rhino/coreg.py", line 643, in coreg_display
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/mne/viz/backends/renderer.py", line 50, in _get_renderer
_check_option('backend_name', backend_name, VALID_3D_BACKENDS)
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/mne/viz/backends/_notebook.py", line 1432, in __init__
super().__init__(*args, **kwargs)
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/mne/viz/backends/_pyvista.py", line 227, in __init__
self.plotter = self.figure._build()
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/mne/viz/backends/_pyvista.py", line 134, in _build
plotter = self._plotter_class(**self.store)
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/plotting.py", line 5870, in __init__
@property
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/plotting.py", line 1794, in enable_trackball_style
def add_on_render_callback(self, callback, render_event=False):
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/render_window_interactor.py", line 347, in enable_trackball_style
renderer.set_chart_interaction(False)
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/render_window_interactor.py", line 291, in update_style
"""Clear key event callbacks."""
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/render_window_interactor.py", line 910, in _style_factory
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/pyvista/plotting/render_window_interactor.py", line 866, in _make_class
def initialize(self):
File "/home/mvanes/anaconda3/envs/osl/lib/python3.8/site-packages/vtk.py", line 5, in <module>
from vtkmodules.vtkWebCore import *
This is probably still worth resolving - i'd keep this issue open as something to look into in the future. VSCode is very popular.
Haven't encountered this recently after a fresh install. Closing as seems irrelevant.
I believe
pyvistaqt
might be a requirement for the source_recon module, as I get this error when I'm running coreg without having it installed (currentlypyvistaqt
is not in our requirements).