[ https://issues.apache.org/jira/browse/SYSTEMML-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347420#comment-15347420 ]
Deron Eriksson commented on SYSTEMML-750: ----------------------------------------- When the pydml is placed in a file, it is being read in line-by-line, where \n is being appended to each line being read in, so if the pydml is being read from a file, the code will always end in \n. > PYDML should not require newline at end of script > ------------------------------------------------- > > Key: SYSTEMML-750 > URL: https://issues.apache.org/jira/browse/SYSTEMML-750 > Project: SystemML > Issue Type: Bug > Components: APIs > Reporter: Deron Eriksson > Fix For: SystemML 0.11 > > > PYDML currently requires a linefeed at the end of the script. No linefeed > should be required on the last line. This should be fixed in Pydml.g4. > For example, the following code: > {code} > SparkConf conf = new > SparkConf().setAppName("MLContextExample").setMaster("local"); > JavaSparkContext sc = new JavaSparkContext(conf); > MLContext ml = new MLContext(sc); > String scriptString = "print('hello world')"; > ml.executeScript(scriptString, true); > {code} > generates the following error: > {code} > [line 1:20] [Syntax error] -> print('hello world') > missing NEWLINE at '<EOF>' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)