Python scripting loading error

Hello.

I would like to get help with the problem I encountered while using Python script nodes.
When I load the Python script node, the following message occurs and the node does not work.


Traceback (most recent call last):
File “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2_3.6.0.v201807061638/py/PythonKernelLauncher.py”, line 84, in
kernel.start()
File “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2_3.6.0.v201807061638/py/python3/PythonKernel.py”, line 84, in start
self._monitor.wait_for_close()
File “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2_3.6.0.v201807061638/py/python3/PythonKernel.py”, line 155, in wait_for_close
self.check_exception()
File “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2_3.6.0.v201807061638/py/python3/PythonKernel.py”, line 151, in check_exception
raise self._exception

AttributeError: ‘Builder’ object has no attribute ‘CreateByteArray’


I set the path directly without using Anaconda in the setup process. I use an extension Pyenv because I use several versions of Python in OSX.

It would be grateful if I could get some advice on this issue.

Hi dupin,

Could you upload your knime.log file, please? (You find it at {your-workspace}/.metadata/knime/knime.log.)
That would help us track down your problem. Thanks!

Marcel

Hope this will help.


knime.log (985.9 KB)

Hi dupin,

Thanks! That did help. The problem seems to be the Flatbuffers serialization library which is used to transfer data between KNIME and Python. A first workaround would be to select a different serialization library via File > Preferences > KNIME > Python > Serialization Library (at the very bottom). I would recommend using Apache Arrow. You would need to install pyarrow=0.7.0 in your Python environment for this to work. Otherwise, CSV (Experimental) works without any additional packages.

Unfortunately, this does not yet solve the actual problem since Flatbuffers is our default serialization library and worked properly in the past. Would you mind also uploading the files “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2.serde.flatbuffers_3.6.0.v201806190638/py/Flatbuffers.py” and “/Applications/KNIME 3.6.0.app/Contents/Eclipse/plugins/org.knime.python2.serde.flatbuffers_3.6.0.v201806190638/py/flatbuffers/builder.py”? You may need to change the file extensions to “.txt” or the like to be able to upload them. Those are the Python files that contain the Flatbuffers logic that causes the problem.

1 Like

I changed the options as you said, and Python worked. However, to resolve the problem, convert the file to txt and upload it. I hope this helps you solve the problem.


builder.txt (22.7 KB)

Flatbuffers.txt (56.5 KB)