You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Wei Zhong (Jira)" <ji...@apache.org> on 2020/05/21 11:44:00 UTC

[jira] [Created] (FLINK-17866) InvalidPathException was thrown when running the test cases of PyFlink on Windows

Wei Zhong created FLINK-17866:
---------------------------------

             Summary: InvalidPathException was thrown when running the test cases of PyFlink on Windows
                 Key: FLINK-17866
                 URL: https://issues.apache.org/jira/browse/FLINK-17866
             Project: Flink
          Issue Type: Bug
          Components: API / Python
            Reporter: Wei Zhong


When running the test_dependency.py on Windows,such exception was thrown:
{code:java}
Error
Traceback (most recent call last):
  File "C:\Users\zw144119\AppData\Local\Continuum\miniconda3\envs\py36\lib\unittest\case.py", line 59, in testPartExecutor
    yield
  File "C:\Users\zw144119\AppData\Local\Continuum\miniconda3\envs\py36\lib\unittest\case.py", line 605, in run
    testMethod()
  File "D:\flink\flink-python\pyflink\table\tests\test_dependency.py", line 55, in test_add_python_file
    self.t_env.execute("test")
  File "D:\flink\flink-python\pyflink\table\table_environment.py", line 1049, in execute
    return JobExecutionResult(self._j_tenv.execute(job_name))
  File "C:\Users\zw144119\AppData\Local\Continuum\miniconda3\envs\py36\lib\site-packages\py4j\java_gateway.py", line 1286, in __call__
    answer, self.gateway_client, self.target_id, self.name)
  File "D:\flink\flink-python\pyflink\util\exceptions.py", line 147, in deco
    return f(*a, **kw)
  File "C:\Users\zw144119\AppData\Local\Continuum\miniconda3\envs\py36\lib\site-packages\py4j\protocol.py", line 328, in get_return_value
    format(target_id, ".", name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling o4.execute.
: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/zw144119/AppData/Local/Temp/tmp0x4273cg/python_file_dir_cfb9e8fe-2812-4a89-ae46-5dc3c844d62c/test_dependency_manage_lib.py
  at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
  at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
  at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
  at java.nio.file.Paths.get(Paths.java:84)
  at org.apache.flink.core.fs.local.LocalFileSystem.pathToFile(LocalFileSystem.java:314)
  at org.apache.flink.core.fs.local.LocalFileSystem.getFileStatus(LocalFileSystem.java:110)
  at org.apache.flink.runtime.jobgraph.JobGraphUtils.addUserArtifactEntries(JobGraphUtils.java:52)
  at org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:186)
  at org.apache.flink.streaming.api.graph.StreamingJobGraphGenerator.createJobGraph(StreamingJobGraphGenerator.java:109)
  at org.apache.flink.streaming.api.graph.StreamGraph.getJobGraph(StreamGraph.java:850)
  at org.apache.flink.client.StreamGraphTranslator.translateToJobGraph(StreamGraphTranslator.java:52)
  at org.apache.flink.client.FlinkPipelineTranslationUtil.getJobGraph(FlinkPipelineTranslationUtil.java:43)
  at org.apache.flink.client.deployment.executors.PipelineExecutorUtils.getJobGraph(PipelineExecutorUtils.java:55)
  at org.apache.flink.client.deployment.executors.LocalExecutor.getJobGraph(LocalExecutor.java:98)
  at org.apache.flink.client.deployment.executors.LocalExecutor.execute(LocalExecutor.java:79)
  at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1786)
  at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1687)
  at org.apache.flink.streaming.api.environment.LocalStreamEnvironment.execute(LocalStreamEnvironment.java:74)
  at org.apache.flink.table.planner.delegation.ExecutorBase.execute(ExecutorBase.java:52)
  at org.apache.flink.table.api.internal.TableEnvironmentImpl.execute(TableEnvironmentImpl.java:1167)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.apache.flink.api.python.shaded.py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
  at org.apache.flink.api.python.shaded.py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
  at org.apache.flink.api.python.shaded.py4j.Gateway.invoke(Gateway.java:282)
  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.lang.Thread.run(Thread.java:748)
{code}
It seems the windows-style path is not recognized by the "Paths.get()" method.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)