knime-scripting includes scripting extensions for KNIME to integrate R, Matlab, Python and Groovy scripts. These extensions include a collection of nodes to develop and deploy templates in the respective languages.
ERROR PythonSnippetNodeModel Traceback (most recent call last):
ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 214, in
ERROR PythonSnippetNodeModel kIn = read_csv(r"/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/knime2python2543081995884595474.csv", True)
ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 143, in read_csv
ERROR PythonSnippetNodeModel types = get_column_types(csv_filename)
ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 68, in get_column_types
ERROR PythonSnippetNodeModel for row in csv_reader:
ERROR PythonSnippetNodeModel _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)
ERROR Python Snippet Execute failed: No python output table found, check script output
Error message:
ERROR PythonSnippetNodeModel Traceback (most recent call last): ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 214, in
ERROR PythonSnippetNodeModel kIn = read_csv(r"/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/knime2python2543081995884595474.csv", True)
ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 143, in read_csv
ERROR PythonSnippetNodeModel types = get_column_types(csv_filename)
ERROR PythonSnippetNodeModel File "/var/folders/aT/aT-JBgnUFAa41sIiC1a8DE+++TQ/-Tmp-/analyze2520056644575458498.py", line 68, in get_column_types
ERROR PythonSnippetNodeModel for row in csv_reader:
ERROR PythonSnippetNodeModel _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)
ERROR Python Snippet Execute failed: No python output table found, check script output
Reason: csv.reader(open(csv_filename, 'rb'), delimiter=',', quotechar='"')
is correct for 2.x but not for 3.x