galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.38k stars 994 forks source link

Uncaught exception when saving workflow #17963

Closed bernt-matthias closed 5 months ago

bernt-matthias commented 5 months ago

Describe the bug

Took the three workflows from https://github.com/galaxyproject/iwc/tree/a15ee19b7e1bf4d698fcd5b52a3649f2aa62226a/workflows/amplicon/qiime2/qiime2-III-V-downsteam and imported them as subworkflows, connected them with appropriate data/integer inputs and among each other (III creates input for IV):

galaxy.web.framework.decorators ERROR 2024-04-11 13:10:47,847 [pN:main.3,p:4002208,tN:WSGI_0] Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/web/framework/decorators.py", line 337, in decorator
    rval = func(self, trans, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 345, in create
    return self.__api_import_new_workflow(trans, payload, **kwd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 667, in __api_import_new_workflow
    workflow, missing_tool_tups = self._workflow_from_dict(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 1051, in _workflow_from_dict
    created_workflow = workflow_contents_manager.build_workflow_from_raw_description(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/managers/workflows.py", line 632, in build_workflow_from_raw_description
    workflow, missing_tool_tups = self._workflow_from_raw_description(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/managers/workflows.py", line 811, in _workflow_from_raw_description
    module, step = self.__module_from_dict(trans, steps, steps_by_external_id, step_dict, **module_kwds)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/managers/workflows.py", line 1749, in __module_from_dict
    module = module_factory.from_dict(trans, step_dict, detached=dry_run, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 2422, in from_dict
    return self.module_types[type].from_dict(trans, d, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 274, in from_dict
    module.recover_state(d.get("tool_state"), input_connections=input_connections, **kwds)
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 348, in recover_state
    state = self.step_state_to_tool_state(state or {})
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 1565, in step_state_to_tool_state
    "parameter_type": state["parameter_type"],
                      ~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'parameter_type'

Galaxy Version and/or server at which you observed the bug Galaxy Version: 23.2 Commit: 6f0711adc9b1125eff3dbd400024c870e3792a3e

Browser and Operating System Operating System: Linux Browser: Firefox

mvdbeek commented 5 months ago

Probably the same as https://github.com/galaxyproject/galaxy/issues/17970