AllenCell / napari-allencell-segmenter

A plugin that enables image segmentation provided by Allen Institute for Cell Science
BSD 3-Clause "New" or "Revised" License
16 stars 6 forks source link

Error Saving Workflow #165

Open jvance1 opened 7 months ago

jvance1 commented 7 months ago

This text document allows the plugin developers to gather the information they need to understand and prioritize your bug report. Please write your responses in the space below each section (replace [your answer here] with your answer), then click the "Submit new issue" button when you are finished. You can preview the formatting of this document using the Preview tab above.

Description

A clear description of the bug I cannot save my workflow through the napari-allencell-segmenter in the napari GUI. I am new to napari and do not know Python, so this may be a very basic issue that can be fixed easily. The error doesn't change if I try to save before or after setting the pre-processing, core, and post-processing steps. My workflow is for h2b_interphase.

Error message

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File C:\napari\envs\napari-0.4.18\lib\site-packages\napari_allencell_segmenter\view\workflow_steps_view.py:241, in WorkflowStepsView._btn_save_workflow_clicked(self=<napari_allencell_segmenter.view.workflow_steps_...epsView(0x1b356503ee0, name="workflowStepsView")>, checked=False)
    240 def _btn_save_workflow_clicked(self, checked: bool):
--> 241     file_path, _ = QFileDialog.getSaveFileName(
        QFileDialog = <class 'PySide2.QtWidgets.QFileDialog'>
        self = <napari_allencell_segmenter.view.workflow_steps_view.WorkflowStepsView(0x1b356503ee0, name="workflowStepsView") at 0x000001B3421E7C40>
        QFileDialog.Option.DontUseNativeDialog = PySide2.QtWidgets.QFileDialog.Option.DontUseNativeDialog
        QFileDialog.Option.DontUseCustomDirectoryIcons = PySide2.QtWidgets.QFileDialog.Option.DontUseCustomDirectoryIcons
        QFileDialog.Option = <class 'PySide2.QtWidgets.QFileDialog.Option'>
    242         self,
    243         caption="Save workflow as...",
    244         filter="Json file (*.json)",
    245         directory="workflow.json",
    246         options=QFileDialog.Option.DontUseNativeDialog | QFileDialog.Option.DontUseCustomDirectoryIcons,
    247     )
    249     if file_path:
    250         steps = [w.get_workflow_step_with_inputs() for w in self._get_workflow_step_widgets()]

AttributeError: PySide2.QtWidgets.QFileDialog.getSaveFileName(): unsupported keyword 'directory'
* If you can't find the error message, go to Plugins > Plugin Errors > napari-allencell-segmenter
* Most of the time, the most helpful information is at the very bottom of the error output

Expected Behavior

What did you expect to happen instead? I expected it to save and tell me where it saved. Instead it does not save a .json file and gives an error message.

Reproduction

Please list the exact steps we can take to reproduce this bug.

  1. Upload images. Mine had to have a very narrow contrast range to see the nuclei
  2. Create new workflow
  3. Run intensity rescale
  4. Press save workflow. This is where the error popped up.

Environment