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
I am running the tomo tutorial dataset EMPIAR-10164 with relion 5 --tomo. I was able to pick the spheres in napari and save the spheres. However, after I closed napari window, it didn't write out any particle star files. It gave me the error message that a plugin is missing to write the layers. I can manually save the n3d sphere layer but not the sphere meshes layer. I noticed that the napari-meshio plugin is already installed when the napari window opened.
Have anyone experienced the same? How should I work around it? It seems there is also a problem between napari and numpy.
Thanks,
Chen
/data/csun/Projects/EMPIAR-10164/myrelion5tomo/Picks/job014/spheremeshes save failed.
No data written! A plugin could not be found to write these 1 layers to /data/csun/Projects/EMPIAR-10164/myrelion5tomo/Picks/job014/spheremeshes
TypeError Traceback (most recent call last)
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/qt/menus/file_menu.py:81, in FileMenu.init..()
26 super().init(trans.('&File'), window.qt_window)
27 self.open_sample_menu = NapariMenu(trans.('Open Sample'), self)
28 ACTIONS = [
29 {
30 'text': trans._('Open File(s)...'),
31 'slot': window._qt_viewer.open_files_dialog,
32 'shortcut': 'Ctrl+O',
33 },
34 {
35 'text': trans.('Open Files as Stack...'),
36 'slot': window._qt_viewer.open_files_dialog_as_stack_dialog,
37 'shortcut': 'Ctrl+Alt+O',
38 },
39 {
40 'text': trans.('Open Folder...'),
41 'slot': window._qt_viewer.open_folder_dialog,
42 'shortcut': 'Ctrl+Shift+O',
43 },
44 {
45 'menu': trans.('Open with Plugin'),
46 'items': [
47 {
48 'text': 'Open File(s)...',
49 'slot': self._open_files_w_plugin,
50 },
51 {
52 'text': 'Open Files as Stack...',
53 'slot': self.open_files_as_stack_w_plugin,
54 },
55 {
56 'text': 'Open Folder...',
57 'slot': self.open_folder_w_plugin,
58 },
59 ],
60 },
61 {'menu': self.open_sample_menu},
62 {},
63 {
64 'text': trans.('Preferences'),
65 'slot': self.open_preferences,
66 'shortcut': 'Ctrl+Shift+P',
67 'statusTip': trans.('Open preferences dialog'),
68 'menuRole': QAction.PreferencesRole,
69 },
70 {},
71 {
72 'text': trans.('Save Selected Layer(s)...'),
73 'slot': lambda: window._qt_viewer._save_layers_dialog(
74 selected=True
75 ),
76 'shortcut': 'Ctrl+S',
77 'enabled': self.layer_count,
78 },
79 {
80 'text': trans.('Save All Layers...'),
---> 81 'slot': lambda: window._qt_viewer._save_layers_dialog(
trans = <napari.utils.translations.TranslationBundle object at 0x7f89a3d5dba0>
window = <napari.qt.qt_main_window.Window object at 0x7f8999ba4cd0>
QAction.PreferencesRole = 5
QAction = <class 'PyQt5.QtWidgets.QAction'>
window.qt_window = <napari.qt.qt_main_window.QtMainWindow object at 0x7f8999729630>
QAction.QuitRole = 6
82 selected=False
83 ),
84 'shortcut': 'Ctrl+Shift+S',
85 'enabled': self.layer_count,
86 },
87 {
88 'text': trans.('Save Screenshot...'),
89 'slot': window.qt_viewer.screenshot_dialog,
90 'shortcut': 'Alt+S',
91 'statusTip': trans.(
92 'Save screenshot of current display, default .png'
93 ),
94 },
95 {
96 'text': trans.('Save Screenshot with Viewer...'),
97 'slot': self.screenshot_dialog,
98 'shortcut': 'Alt+Shift+S',
99 'statusTip': trans.(
100 'Save screenshot of current display with the viewer, default .png'
101 ),
102 },
103 {
104 'text': trans.('Copy Screenshot to Clipboard'),
105 'slot': window.qt_viewer.clipboard,
106 'shortcut': 'Alt+C',
107 'statusTip': trans.(
108 'Copy screenshot of current display to the clipboard'
109 ),
110 },
111 {
112 'text': trans.('Copy Screenshot with Viewer to Clipboard'),
113 'slot': window.clipboard,
114 'shortcut': 'Alt+Shift+C',
115 'statusTip': trans.(
116 'Copy screenshot of current display with the viewer to the clipboard'
117 ),
118 },
119 {},
120 {
121 'text': trans.('Close Window'),
122 'slot': self.close_window,
123 'shortcut': 'Ctrl+W',
124 },
125 {
126 'when': running_as_constructor_app(),
127 'text': trans.('Restart'),
128 'slot': window.qt_window.restart,
129 },
130 # OS X will rename this to Quit and put it in the app menu.
131 # This quits the entire QApplication and closes all windows.
132 {
133 'text': trans.('Exit'),
134 'slot': self._close_app,
135 'shortcut': 'Ctrl+Q',
136 'menuRole': QAction.QuitRole,
137 },
138 ]
139 populate_menu(self, ACTIONS)
141 self._pref_dialog = None
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/_qt/qt_viewer.py:767, in QtViewer._save_layers_dialog(self=<napari._qt.qt_viewer.QtViewer object>, selected=False)
763 writer = _npe2_decode_selected_filter(
764 ext_str, selected_filter, writers
765 )
766 with warnings.catch_warnings(record=True) as wa:
--> 767 saved = self.viewer.layers.save(
self = <napari._qt.qt_viewer.QtViewer object at 0x7f89997296c0>
self.viewer.layers = [<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>]
self.viewer = Viewer(camera=Camera(center=(135.3438649875377, 260.5870937773653, 270.0601484860371), zoom=1.114589259259259, angles=(1.6221426385038984, -8.724935607783912, 89.13874617226506), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(141.72788964110683, 502.972477849981, 204.7259809784764), scaled=True, size=1, style=<CursorStyle.STANDARD: 'standard'>), dims=Dims(ndim=3, ndisplay=3, last_used=0, range=((0.0, 270.0, 1.0), (-15.363716125488281, 540.0, 1.0), (0.0, 540.0, 1.0)), current_step=(134, 269, 269), order=(0, 1, 2), axis_labels=('0', '1', '2')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>], help='use <2> for transform', status={'layer_base': 'tomogram', 'source_type': '', 'plugin': '', 'coordinates': ' [142 503 205]'}, tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[<bound method SphereAnnotator._add_point_on_mouse_alt_click of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7f899b26a560>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'[': <bound method TomogramBrowserWidget.previous_tilt_series of <tomography_python_programs._qt.components.tomogram_browser.TomogramBrowserWidget object at 0x7f89a31ea560>>, ']': <bound method TomogramBrowserWidget.next_tilt_series of <tomography_python_programs._qt.components.tomogram_browser.TomogramBrowserWidget object at 0x7f89a31ea560>>, 'R': <bound method SphereAnnotator._set_radius_from_mouse_event of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>, 'N': <bound method SphereAnnotator._enable_add_mode of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>})
filename = '/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers'
selected = False
writer = None
768 filename, selected=selected, _writer=writer
769 )
770 logging.debug('Saved %s', saved)
771 error_messages = "\n".join(str(x.message.args[0]) for x in wa)
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/components/layerlist.py:476, in LayerList.save(self=[<Image layer 'tomogram' at 0x7f897c170b50>, <Po...Surface layer 'sphere meshes' at 0x7f895875d0c0>], path='/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers', selected=False, plugin=None, _writer=None)
473 warnings.warn(msg)
474 return []
--> 476 return save_layers(path, layers, plugin=plugin, _writer=_writer)
layers = [<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>]
path = '/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers'
plugin = None
_writer = None
Hello,
I am running the tomo tutorial dataset EMPIAR-10164 with relion 5 --tomo. I was able to pick the spheres in napari and save the spheres. However, after I closed napari window, it didn't write out any particle star files. It gave me the error message that a plugin is missing to write the layers. I can manually save the n3d sphere layer but not the sphere meshes layer. I noticed that the napari-meshio plugin is already installed when the napari window opened.
Have anyone experienced the same? How should I work around it? It seems there is also a problem between napari and numpy.
Thanks,
Chen
/data/csun/Projects/EMPIAR-10164/myrelion5tomo/Picks/job014/spheremeshes save failed.
No data written! A plugin could not be found to write these 1 layers to /data/csun/Projects/EMPIAR-10164/myrelion5tomo/Picks/job014/spheremeshes
TypeError Traceback (most recent call last)
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/qt/menus/file_menu.py:81, in FileMenu.init..()
26 super().init(trans.('&File'), window.qt_window)
27 self.open_sample_menu = NapariMenu(trans.('Open Sample'), self)
28 ACTIONS = [
29 {
30 'text': trans._('Open File(s)...'),
31 'slot': window._qt_viewer.open_files_dialog,
32 'shortcut': 'Ctrl+O',
33 },
34 {
35 'text': trans.('Open Files as Stack...'),
36 'slot': window._qt_viewer.open_files_dialog_as_stack_dialog,
37 'shortcut': 'Ctrl+Alt+O',
38 },
39 {
40 'text': trans.('Open Folder...'),
41 'slot': window._qt_viewer.open_folder_dialog,
42 'shortcut': 'Ctrl+Shift+O',
43 },
44 {
45 'menu': trans.('Open with Plugin'),
46 'items': [
47 {
48 'text': 'Open File(s)...',
49 'slot': self._open_files_w_plugin,
50 },
51 {
52 'text': 'Open Files as Stack...',
53 'slot': self.open_files_as_stack_w_plugin,
54 },
55 {
56 'text': 'Open Folder...',
57 'slot': self.open_folder_w_plugin,
58 },
59 ],
60 },
61 {'menu': self.open_sample_menu},
62 {},
63 {
64 'text': trans.('Preferences'),
65 'slot': self.open_preferences,
66 'shortcut': 'Ctrl+Shift+P',
67 'statusTip': trans.('Open preferences dialog'),
68 'menuRole': QAction.PreferencesRole,
69 },
70 {},
71 {
72 'text': trans.('Save Selected Layer(s)...'),
73 'slot': lambda: window._qt_viewer._save_layers_dialog(
74 selected=True
75 ),
76 'shortcut': 'Ctrl+S',
77 'enabled': self.layer_count,
78 },
79 {
80 'text': trans.('Save All Layers...'),
---> 81 'slot': lambda: window._qt_viewer._save_layers_dialog(
trans = <napari.utils.translations.TranslationBundle object at 0x7f89a3d5dba0>
window = <napari.qt.qt_main_window.Window object at 0x7f8999ba4cd0>
QAction.PreferencesRole = 5
QAction = <class 'PyQt5.QtWidgets.QAction'>
window.qt_window = <napari.qt.qt_main_window.QtMainWindow object at 0x7f8999729630>
QAction.QuitRole = 6
82 selected=False
83 ),
84 'shortcut': 'Ctrl+Shift+S',
85 'enabled': self.layer_count,
86 },
87 {
88 'text': trans.('Save Screenshot...'),
89 'slot': window.qt_viewer.screenshot_dialog,
90 'shortcut': 'Alt+S',
91 'statusTip': trans.(
92 'Save screenshot of current display, default .png'
93 ),
94 },
95 {
96 'text': trans.('Save Screenshot with Viewer...'),
97 'slot': self.screenshot_dialog,
98 'shortcut': 'Alt+Shift+S',
99 'statusTip': trans.(
100 'Save screenshot of current display with the viewer, default .png'
101 ),
102 },
103 {
104 'text': trans.('Copy Screenshot to Clipboard'),
105 'slot': window.qt_viewer.clipboard,
106 'shortcut': 'Alt+C',
107 'statusTip': trans.(
108 'Copy screenshot of current display to the clipboard'
109 ),
110 },
111 {
112 'text': trans.('Copy Screenshot with Viewer to Clipboard'),
113 'slot': window.clipboard,
114 'shortcut': 'Alt+Shift+C',
115 'statusTip': trans.(
116 'Copy screenshot of current display with the viewer to the clipboard'
117 ),
118 },
119 {},
120 {
121 'text': trans.('Close Window'),
122 'slot': self.close_window,
123 'shortcut': 'Ctrl+W',
124 },
125 {
126 'when': running_as_constructor_app(),
127 'text': trans.('Restart'),
128 'slot': window.qt_window.restart,
129 },
130 # OS X will rename this to Quit and put it in the app menu.
131 # This quits the entire QApplication and closes all windows.
132 {
133 'text': trans.('Exit'),
134 'slot': self._close_app,
135 'shortcut': 'Ctrl+Q',
136 'menuRole': QAction.QuitRole,
137 },
138 ]
139 populate_menu(self, ACTIONS)
141 self._pref_dialog = None
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/_qt/qt_viewer.py:767, in QtViewer._save_layers_dialog(self=<napari._qt.qt_viewer.QtViewer object>, selected=False)
763 writer = _npe2_decode_selected_filter(
764 ext_str, selected_filter, writers
765 )
766 with warnings.catch_warnings(record=True) as wa:
--> 767 saved = self.viewer.layers.save(
self = <napari._qt.qt_viewer.QtViewer object at 0x7f89997296c0>
self.viewer.layers = [<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>]
self.viewer = Viewer(camera=Camera(center=(135.3438649875377, 260.5870937773653, 270.0601484860371), zoom=1.114589259259259, angles=(1.6221426385038984, -8.724935607783912, 89.13874617226506), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(141.72788964110683, 502.972477849981, 204.7259809784764), scaled=True, size=1, style=<CursorStyle.STANDARD: 'standard'>), dims=Dims(ndim=3, ndisplay=3, last_used=0, range=((0.0, 270.0, 1.0), (-15.363716125488281, 540.0, 1.0), (0.0, 540.0, 1.0)), current_step=(134, 269, 269), order=(0, 1, 2), axis_labels=('0', '1', '2')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>], help='use <2> for transform', status={'layer_base': 'tomogram', 'source_type': '', 'plugin': '', 'coordinates': ' [142 503 205]'}, tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[<bound method SphereAnnotator._add_point_on_mouse_alt_click of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7f899b26a560>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'[': <bound method TomogramBrowserWidget.previous_tilt_series of <tomography_python_programs._qt.components.tomogram_browser.TomogramBrowserWidget object at 0x7f89a31ea560>>, ']': <bound method TomogramBrowserWidget.next_tilt_series of <tomography_python_programs._qt.components.tomogram_browser.TomogramBrowserWidget object at 0x7f89a31ea560>>, 'R': <bound method SphereAnnotator._set_radius_from_mouse_event of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>, 'N': <bound method SphereAnnotator._enable_add_mode of <napari_threedee.annotators.spheres.annotator.SphereAnnotator object at 0x7f895805d600>>})
filename = '/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers'
selected = False
writer = None
768 filename, selected=selected, _writer=writer
769 )
770 logging.debug('Saved %s', saved)
771 error_messages = "\n".join(str(x.message.args[0]) for x in wa)
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/components/layerlist.py:476, in LayerList.save(self=[<Image layer 'tomogram' at 0x7f897c170b50>, <Po...Surface layer 'sphere meshes' at 0x7f895875d0c0>], path='/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers', selected=False, plugin=None, _writer=None)
473 warnings.warn(msg)
474 return []
--> 476 return save_layers(path, layers, plugin=plugin, _writer=_writer)
layers = [<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>]
path = '/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers'
plugin = None
_writer = None
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/plugins/io.py:225, in save_layers(path='/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers', layers=[<Image layer 'tomogram'>, <Points layer 'n3d spheres'>, <Surface layer 'sphere meshes'>], plugin=None, _writer=None)
223 writer_name = ''
224 if len(layers) > 1:
--> 225 written, writer_name = _write_multiple_layers_with_plugins(
writer_name = ''
layers = [<Image layer 'tomogram' at 0x7f897c170b50>, <Points layer 'n3d spheres' at 0x7f89581878b0>, <Surface layer 'sphere meshes' at 0x7f895875d0c0>]
path = '/data/csun/Projects/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers'
plugin = None
_writer = None
226 path, layers, plugin_name=plugin, _writer=_writer
227 )
228 elif len(layers) == 1:
229 _written, writer_name = _write_single_layer_with_plugins(
230 path, layers[0], plugin_name=plugin, _writer=_writer
231 )
File ~/miniconda3/envs/relion-5.0/lib/python3.10/site-packages/napari/plugins/io.py:387, in _write_multiple_layers_with_plugins(path='/data/csun/Projects/CART/EMPIAR-10164/myrelion5tomo/myrelion/Picks/job014/20250206alllayers', layers=[<Image layer 'tomogram'>, <Points layer 'n3d spheres'>, <Surface layer 'sphere meshes'>], plugin_name=None, writer=None)
380 else:
381 msg = trans.(
382 'Unable to find plugin capable of writing this combination of layer types: {layer_types}',
383 deferred=True,
384 layer_types=layer_types,
385 )
--> 387 raise TypeError(msg)
msg = "Unable to find plugin capable of writing this combination of layer types: ['image', 'points', 'surface']"
389 try:
390 return (
391 writer_function(abspath_or_url(path), layer_data),
392 implementation.plugin_name,
393 )
TypeError: Unable to find plugin capable of writing this combination of layer types: ['image', 'points', 'surface']
The text was updated successfully, but these errors were encountered: