AllenCell / AllenCell/allencell-segmenter-ml

failed to run on Windows

オープン
#633 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
5
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**

I just did a fresh install on Windows. Then, I got the following errors when trying to load the plugin:

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
File ~\.conda\envs\sml\lib\site-packages\app_model\backends\qt\_qaction.py:59, in QCommandAction._on_triggered(self=QMenuItemAction(MenuItem(when=None, group='3_plu...ncell-segmenter-ml)'))), alt=None), app='napari'), checked=True)
55 def _on_triggered(self, checked: bool) -> None:
56 # execute_command returns a Future, for the sake of eventually being
57 # asynchronous without breaking the API. For now, we call result()
58 # to raise any exceptions.
---> 59 self._app.commands.execute_command(self._command_id).result()
self._command_id = 'allencell-segmenter-ml:Allen Cell Segmenter - ML'
self = QMenuItemAction(MenuItem(when=None, group='3_plugin_contributions', order=None, command=CommandRule(id='allencell-segmenter-ml:Allen Cell Segmenter - ML', title='Allen Cell Segmenter - ML (allencell-segmenter-ml)', category=None, tooltip=None, status_tip=None, icon=None, icon_visible_in_menu=True, enablement=None, short_title=None, toggled=ToggleRule(condition=None, get_current=functools.partial(, full_name='Allen Cell Segmenter - ML (allencell-segmenter-ml)'))), alt=None), app='napari')
self._app = Application('napari')

File ~\.conda\envs\sml\lib\site-packages\app_model\registries\_commands_reg.py:247, in CommandsRegistry.execute_command(self=, id='allencell-segmenter-ml:Allen Cell Segmenter - ML', execute_asynchronously=False, *args=(), **kwargs={})
243 except Exception as e:
244 if self._raise_synchronous_exceptions:
245 # note, the caller of this function can also achieve this by
246 # calling `future.result()` on the returned future object.
--> 247 raise e
248 future.set_exception(e)
250 return future

File ~\.conda\envs\sml\lib\site-packages\app_model\registries\_commands_reg.py:242, in CommandsRegistry.execute_command(self=, id='allencell-segmenter-ml:Allen Cell Segmenter - ML', execute_asynchronously=False, *args=(), **kwargs={})
240 future: Future = Future()
241 try:
--> 242 future.set_result(cmd(*args, **kwargs))
future =
cmd = ._inner.._exec at 0x0000023A0383CDC0>
args = ()
kwargs = {}
243 except Exception as e:
244 if self._raise_synchronous_exceptions:
245 # note, the caller of this function can also achieve this by
246 # calling `future.result()` on the returned future object.

File ~\.conda\envs\sml\lib\site-packages\in_n_out\_store.py:934, in Store.inject_processors.._deco.._exec(*args=(), **kwargs={})
932 @wraps(func)
933 def _exec(*args: P.args, **kwargs: P.kwargs) -> R:
--> 934 result = func(*args, **kwargs)
func = ._inner.._exec at 0x0000023A0383CEE0>
args = ()
kwargs = {}
935 if result is not None:
936 self.process(
937 result,
938 type_hint=type_hint,
(...)
941 _funcname=getattr(func, "__qualname__", str(func)),
942 )

File ~\.conda\envs\sml\lib\site-packages\in_n_out\_store.py:804, in Store.inject.._inner.._exec(*args=(), **kwargs={})
797 logger.debug(
798 " Calling %s with %r (injected %r)",
799 _fname,
800 bound.arguments,
801 _injected_names,
802 )
803 try:
--> 804 result = func(**bound.arguments)
bound =
func = functools.partial(, plugin='allencell-segmenter-ml', widget_name='Allen Cell Segmenter - ML', full_name='Allen Cell Segmenter - ML (allencell-segmenter-ml)')
bound.arguments = {'plugin': 'allencell-segmenter-ml', 'widget_name': 'Allen Cell Segmenter - ML', 'full_name': 'Allen Cell Segmenter - ML (allencell-segmenter-ml)'}
805 except TypeError as e:
806 if "missing" not in e.args[0]:

File ~\.conda\envs\sml\lib\site-packages\napari\_qt\_qplugins\_qnpe2.py:352, in _toggle_or_get_widget(plugin='allencell-segmenter-ml', widget_name='Allen Cell Segmenter - ML', full_name='Allen Cell Segmenter - ML (allencell-segmenter-ml)')
350 if widget_param:
351 kwargs[widget_param] = viewer
--> 352 return widget_callable(**kwargs), full_name
kwargs = {'viewer': Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True, orientation=(, , )), cursor=Cursor(position=(1.0, 1.0), viewbox=None, scaled=True, style=, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTuple(start=0.0, stop=2.0, step=1.0), RangeTuple(start=0.0, stop=2.0, step=1.0)), margin_left=(0.0, 0.0), margin_right=(0.0, 0.0), point=(0.0, 0.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False, spacing=0.0), layers=[], help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={})}
widget_callable =
full_name = 'Allen Cell Segmenter - ML (allencell-segmenter-ml)'

File ~\.conda\envs\sml\lib\site-packages\allencell_ml_segmenter\main\main_widget.py:150, in MainWidget.__init__(self=, viewer=Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoo...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), settings=None)
143 self._training_view: TrainingView = TrainingView(
144 main_model=self._model,
145 viewer=self.viewer,
146 experiments_model=self._experiments_model,
147 training_model=self._training_model,
148 )
149 self._initialize_window(self._training_view, "Training")
--> 150 self._prediction_view: PredictionView = PredictionView(
PredictionView =
self =
self._model =
self._prediction_model =
self._prediction_file_input_model =
self.viewer =
151 main_model=self._model,
152 prediction_model=self._prediction_model,
153 file_input_model=self._prediction_file_input_model,
154 viewer=self.viewer,
155 )
156 self._initialize_window(self._prediction_view, "Prediction")
157 self._window_container.currentChanged.connect(self._tab_changed)

File ~\.conda\envs\sml\lib\site-packages\allencell_ml_segmenter\prediction\view.py:76, in PredictionView.__init__(self=, main_model=, prediction_model=, file_input_model=, viewer=, img_data_extractor=)
73 self._title.setObjectName("title")
74 layout.addWidget(self._title, alignment=Qt.AlignmentFlag.AlignHCenter)
---> 76 self._file_input_widget: FileInputWidget = FileInputWidget(
FileInputWidget =
self =
self._file_input_model =
self._viewer =
self._service =
77 self._file_input_model, self._viewer, self._service
78 )
79 self._file_input_widget.setObjectName("fileInput")
81 # Disabled for V1 chrishu 3/30/24 https://github.com/AllenCell/allencell-ml-segmenter/issues/274
82 # self._model_input_widget: ModelInputWidget = ModelInputWidget(
83 # self._prediction_model
(...)
86
87 # Dummy divs allow for easy alignment

File ~\.conda\envs\sml\lib\site-packages\allencell_ml_segmenter\core\file_input_widget.py:73, in FileInputWidget.__init__(self=, model=, viewer=, service=, include_channel_selection=True, mode=)
67 self.setSizePolicy(
68 QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Maximum
69 )
71 # set up napari event listener for layer changes
72 # this keeps the layer list in our UI updated as the layers are added/deleted from napari
---> 73 self._viewer.subscribe_layers_change_event(
self._viewer =
self =
74 function=self._update_layer_list
75 )
77 frame: QFrame = QFrame()
78 frame_layout: QVBoxLayout = QVBoxLayout()

File ~\.conda\envs\sml\lib\site-packages\allencell_ml_segmenter\main\viewer.py:124, in Viewer.subscribe_layers_change_event(self=, function=>)
121 def subscribe_layers_change_event(
122 self, function: Callable[[NapariEvent], None]
123 ) -> None:
--> 124 self.viewer.events.layers_change.connect(function)
function = >
self.viewer = Viewer(camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True, orientation=(, , )), cursor=Cursor(position=(1.0, 1.0), viewbox=None, scaled=True, style=, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTuple(start=0.0, stop=2.0, step=1.0), RangeTuple(start=0.0, stop=2.0, step=1.0)), margin_left=(0.0, 0.0), margin_right=(0.0, 0.0), point=(0.0, 0.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False, spacing=0.0), layers=[], help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={})
self =

File ~\.conda\envs\sml\lib\site-packages\napari\utils\events\event.py:966, in EmitterGroup.__getattr__(self=, name='layers_change')
965 def __getattr__(self, name) -> EventEmitter:
--> 966 return object.__getattribute__(self, name)
self =
name = 'layers_change'

AttributeError: 'EmitterGroup' object has no attribute 'layers_change'

**Environment (please complete the following information):**
- Windows 10 Enterprise
- latest as of 2025.08.29
- latest as of 2025.08.29
- GPU: yes, RTX4000
- CUDA version: 12.8

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。