Github user rmetzger commented on the pull request:

    https://github.com/apache/incubator-flink/pull/202#issuecomment-63879867
  
    I copied the wordcount example into a file, trying to run it:
    ```
    robert@robert-tower ...HOT-bin/flink-0.8-incubating-SNAPSHOT (git)-[papipr] 
% ll
    total 84
    drwxr-xr-x 2 robert robert  4096 Nov 20 21:59 bin/
    drwxr-xr-x 2 robert robert  4096 Nov 20 21:59 conf/
    -rw-r--r-- 1 robert robert   539 Nov 20 21:59 DISCLAIMER
    drwxr-xr-x 3 robert robert  4096 Nov 20 21:59 examples/
    drwxr-xr-x 2 robert robert  4096 Nov 20 21:59 lib/
    -rw-r--r-- 1 robert robert 23843 Nov 20 21:59 LICENSE
    drwxr-xr-x 2 robert robert  4096 Nov 20 22:02 log/
    -rw-r--r-- 1 robert robert 19706 Nov 20 21:59 NOTICE
    -rw-r--r-- 1 robert robert  1348 Nov 20 21:59 README.txt
    drwxr-xr-x 5 robert robert  4096 Nov 20 21:59 resources/
    drwxr-xr-x 2 robert robert  4096 Nov 20 21:59 tools/
    -rw-r--r-- 1 robert robert   928 Nov 20 22:02 wc.py
    robert@robert-tower ...HOT-bin/flink-0.8-incubating-SNAPSHOT (git)-[papipr] 
% ./bin/pyflink.sh -v  wc.py
    Error: The main method caused an error.
    org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:445)
        at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:346)
        at org.apache.flink.client.program.Client.run(Client.java:244)
        at 
org.apache.flink.client.CliFrontend.executeProgram(CliFrontend.java:347)
        at org.apache.flink.client.CliFrontend.run(CliFrontend.java:334)
        at 
org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:1001)
        at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1025)
    Caused by: java.io.IOException: The file URI 'wc.py' is not valid.  File 
URIs need to specify aboslute file paths.
        at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:212)
        at org.apache.flink.core.fs.Path.getFileSystem(Path.java:299)
        at org.apache.flink.runtime.filecache.FileCache.copy(FileCache.java:118)
        at 
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.prepareFiles(PythonPlanBinder.java:94)
        at 
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.go(PythonPlanBinder.java:75)
        at 
org.apache.flink.languagebinding.api.java.python.PythonPlanBinder.main(PythonPlanBinder.java:62)
        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:483)
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:430)
        ... 6 more
    ```
    
    It would be convenient for users if the program would not expect an 
absolute path.
    
    2. Error
    ```
    ./bin/pyflink.sh -v  
/home/robert/incubator-flink/flink-dist/target/flink-0.8-incubating-SNAPSHOT-bin/flink-0.8-incubating-SNAPSHOT/wc.py
    StreamPrinter: Traceback (most recent call last):
    StreamPrinter:   File "/tmp/flink_plan/flink/connection/Connection.py", 
line 24, in <module>
    StreamPrinter:     import cStringIO
    StreamPrinter: ImportError: No module named 'cStringIO'
    StreamPrinter: 
    StreamPrinter: During handling of the above exception, another exception 
occurred:
    StreamPrinter: 
    StreamPrinter: Traceback (most recent call last):
    StreamPrinter:   File "/tmp/flink_plan/plan.py", line 1, in <module>
    StreamPrinter:     from flink.plan.Environment import get_environment
    StreamPrinter:   File "/tmp/flink_plan/flink/plan/Environment.py", line 18, 
in <module>
    StreamPrinter:     from flink.connection import Connection
    StreamPrinter:   File "/tmp/flink_plan/flink/connection/Connection.py", 
line 28, in <module>
    StreamPrinter:     import StringIO
    StreamPrinter: ImportError: No module named 'StringIO'
    ```
    
    Maybe we need a section that describes how to install the dependencies? (or 
at least list them)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to