You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2023/08/17 22:36:00 UTC

[jira] [Updated] (FLINK-26666) Improve the error message of pyflink and flink version mismatch

     [ https://issues.apache.org/jira/browse/FLINK-26666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flink Jira Bot updated FLINK-26666:
-----------------------------------
    Labels: pull-request-available stale-assigned  (was: pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in 30 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a comment updating the community on your progress.  If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone else may work on it.


> Improve the error message of pyflink and flink version mismatch
> ---------------------------------------------------------------
>
>                 Key: FLINK-26666
>                 URL: https://issues.apache.org/jira/browse/FLINK-26666
>             Project: Flink
>          Issue Type: Sub-task
>          Components: API / Python
>    Affects Versions: 1.16.0
>            Reporter: Huang Xingbo
>            Assignee: bo zhao
>            Priority: Major
>              Labels: pull-request-available, stale-assigned
>
> When a user runs a pyflink job locally, the following error will be reported because FLINK_HOME is set and the version of flink binaray is inconsistent with the version of pyflink:
> {code:java}
> Traceback (most recent call last):
>   File "word_count.py", line 117, in <module>
>     word_count(known_args.input, known_args.output)
>   File "word_count.py", line 49, in word_count
>     env = StreamExecutionEnvironment.get_execution_environment()
>   File "/home/knaufk/.virtualenvs/flink-1.14/lib/python3.8/site-packages/pyflink/datastream/stream_execution_environment.py", line 732, in get_execution_environment
>     gateway = get_gateway()
>   File "/home/knaufk/.virtualenvs/flink-1.14/lib/python3.8/site-packages/pyflink/java_gateway.py", line 67, in get_gateway
>     _gateway.jvm.org.apache.flink.client.python.PythonEnvUtils.resetCallbackClient(
>   File "/home/knaufk/.virtualenvs/flink-1.14/lib/python3.8/site-packages/py4j/java_gateway.py", line 1285, in __call__
>     return_value = get_return_value(
>   File "/home/knaufk/.virtualenvs/flink-1.14/lib/python3.8/site-packages/py4j/protocol.py", line 330, in get_return_value
>     raise Py4JError(
> py4j.protocol.Py4JError: An error occurred while calling z:org.apache.flink.client.python.PythonEnvUtils.resetCallbackClient. Trace:
> org.apache.flink.api.python.shaded.py4j.Py4JException: Method resetCallbackClient([class org.apache.flink.api.python.shaded.py4j.GatewayServer, class java.lang.String, class java.lang.Integer]) does not exist
> 	at org.apache.flink.api.python.shaded.py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)
> 	at org.apache.flink.api.python.shaded.py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:339)
> 	at org.apache.flink.api.python.shaded.py4j.Gateway.invoke(Gateway.java:276)
> 	at org.apache.flink.api.python.shaded.py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
> 	at org.apache.flink.api.python.shaded.py4j.commands.CallCommand.execute(CallCommand.java:79)
> 	at org.apache.flink.api.python.shaded.py4j.GatewayConnection.run(GatewayConnection.java:238)
> 	at java.base/java.lang.Thread.run(Thread.java:829)
> {code}
> We can add some guiding suggestions in the error message:
> {code:java}
> you have two choices to solve this problem:
> 1. You can unset the FLINK_HOME environment variable.
> 2. Make sure that the flink version of FLINK_HOME is the same as the pyflink version
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)