jieguangzhou opened a new issue, #11605:
URL: https://github.com/apache/dolphinscheduler/issues/11605

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   <img width="687" alt="image" 
src="https://user-images.githubusercontent.com/31528124/186053396-a646d3cf-30a4-4d6b-9d23-0ca2ffce9162.png";>
   
   
   ```shell
   Traceback (most recent call last):
     File "src/pydolphinscheduler/examples/task_switch_example.py", line 50, in 
<module>
       pd.submit()
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py",
 line 410, in submit
       json.dumps(self.task_definition_json),
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py",
 line 247, in task_definition_json
       return [task.get_define() for task in self.tasks.values()]
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py",
 line 247, in <listcomp>
       return [task.get_define() for task in self.tasks.values()]
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py",
 line 69, in get_define
       content = self.get_define_custom(camel_attr, self._DEFINE_ATTR)
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py",
 line 56, in get_define_custom
       val = getattr(self, attr, None)
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py",
 line 162, in task_params
       params["switchResult"] = self.condition.get_define()
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py",
 line 128, in get_define
       self.set_define_attr()
     File 
"/home/lucky/WhaleOps/dolphinscheduler/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py",
 line 112, in set_define_attr
       raise PyDSParamException(
   pydolphinscheduler.exceptions.PyDSParamException: Task Switch's parameter 
only support exactly one default branch.
   ```
   
   ### What you expected to happen
   
   Should be successful
   
   ### How to reproduce
   
   Do not define the default branch at the end
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   dev
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to