Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py4j.protocol.Py4JError: An error occurred while calling t.getCodeAndVersion #159

Open
mmarzl17 opened this issue Jan 6, 2025 · 1 comment
Assignees
Labels
bug Something isn't working wait-response

Comments

@mmarzl17
Copy link

mmarzl17 commented Jan 6, 2025

dolphinscheulder的版本是3.2.1
pydolphinscheduler的版本是从master分支构建的 pip install git+https://github.com/apache/dolphinscheduler-sdk-python.git#egg=apache-dolphinscheduler

py4j的版本是0.10.9.8

提交任务的时候,报这个错
File "/usr/local/lib/python3.10/dist-packages/prophet_flow_core/dolphinscheduler/workflow.py", line 40, in submit_workflow
_task_template[key] = Shell(
File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/tasks/shell.py", line 59, in init
super().init(name, TaskType.SHELL, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/core/task.py", line 224, in init
self.code, self.version = self.gen_code_and_version()
File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/core/task.py", line 447, in gen_code_and_version
result = gateway.get_code_and_version(
File "/usr/local/lib/python3.10/dist-packages/pydolphinscheduler/java_gateway.py", line 144, in get_code_and_version
return self.gateway.entry_point.getCodeAndVersion(
File "/usr/local/lib/python3.10/dist-packages/py4j/java_gateway.py", line 1355, in call
return_value = get_return_value(
File "/usr/local/lib/python3.10/dist-packages/py4j/protocol.py", line 334, in get_return_value
raise Py4JError(
py4j.protocol.Py4JError: An error occurred while calling t.getCodeAndVersion

这个怎么解决呀

@zhongjiajie zhongjiajie self-assigned this Jan 12, 2025
@zhongjiajie zhongjiajie added the bug Something isn't working label Jan 12, 2025
@zhongjiajie
Copy link
Member

@mmarzl17 I have released a new version pip install apache-dolphinscheduler==4.1.0 in PyPI now, and I think it works correctly in dolphinscheduler 3.2.1 because I tried

# for dolphinscheduler
DOLPHINSCHEDULER_VERSION=3.2.1
docker run --name dolphinscheduler-standalone-server -p 12345:12345 -p 25333:25333 -d apache/dolphinscheduler-standalone-server:"${DOLPHINSCHEDULER_VERSION}"

# for python SDK
python -m pip install apache-dolphinscheduler==4.1.0
python tutorial.py

And everything works fine on my device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wait-response
Projects
None yet
Development

No branches or pull requests

2 participants