Closed dietzc closed 9 years ago
Hey! Sorry I'm at the retreat in Poland with poor connection. But basically the library tries to use a C code to open certain types of tiff files faster. For simplicity we just omitted the file meaning it should still work fine but be slower on certain types. I have to check if we can just get rid of this warning. I come back tomorrow night, i can have a closer look at it then. Otherwise you can try to comment out the warning and see if it still fails. Cheers, Laurent Le 11 mai 2015 14:08, "Christian Dietz" notifications@github.com a écrit :
Hi all,
I tried to run a test-flow (see https://github.com/knime-ip/knip-python-extensions/blob/master/testflows/Python.zip) which simply produces images with different dimensionalites and copies them in the python node. However, this didn't work a expected. See the following exception
ERROR PythonKernel /home/dietzc/devel/git-repositories/knip-python-extensions/org.knime.knip.python.extensions/py/tifffile.py:156: UserWarning: failed to import the optional _tifffile C extension module. Loading of some compressed images will be slow. Tifffile.c can be obtained at http://www.lfd.uci.edu/~gohlke/ "failed to import the optional _tifffile C extension module.\n"
I'm running it with the latest master. Any idea whats going on?
Cheers and thank you,
Christian
PS: you can simply import the testflow into your KNIME with File -> Import Workflow (Archive File).
— Reply to this email directly or view it on GitHub https://github.com/knime-ip/knip-python-extensions/issues/3.
Have fun at the retreat. No need to hurry with the fix! Thanks for the help :+1:
Fascinating! Python converts a warning to an Error? I uncommented the lines. Could you try again?
I tried a again. Now I get: ERROR Python Script Execute failed: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
. Ideas? :-)
I can reproduce the error. The execution of the Python node fails at about 15%. I assume one of the input table objects cannot be handled by tifffile. Is it possible to make knime give us the traceback/full error message of the exception? Without it we have to go with trial and error...
The knime.log contains the full output (standard out and error out) of Python.
IMHO these are the relevant lines from workspace/.metadata/knime/knime.log
, but I don't understand them / can't see any Python traceback.
2015-05-12 15:15:59,424 DEBUG KNIME-Worker-0 Python Script : Configure succeeded. (Python Script)
2015-05-12 15:15:59,424 DEBUG KNIME-Worker-0 NodeContainer : Python 0 has new state: CONFIGURED
2015-05-12 15:15:59,424 DEBUG KNIME-WFM-Parent-Notifier NodeContainer : ROOT has new state: IDLE
2015-05-12 15:16:00,394 DEBUG main NodeContainerEditPart : Missing Value 0:3 (EXECUTED)
2015-05-12 15:16:00,395 DEBUG main NodeContainerEditPart : Python Script 0:2 (CONFIGURED)
2015-05-12 15:16:01,676 DEBUG main ExecuteAction : Creating execution job for 1 node(s)...
2015-05-12 15:16:01,677 DEBUG main NodeContainer : Setting dirty flag on Python Script 0:2
2015-05-12 15:16:01,678 DEBUG main NodeContainer : Python Script 0:2 has new state: CONFIGURED_MARKEDFOREXEC
2015-05-12 15:16:01,678 DEBUG main NodeContainer : Python Script 0:2 has new state: CONFIGURED_QUEUED
2015-05-12 15:16:01,679 DEBUG main NodeContainer : Python 0 has new state: EXECUTING
2015-05-12 15:16:01,679 DEBUG KNIME-WFM-Parent-Notifier NodeContainer : ROOT has new state: EXECUTING
2015-05-12 15:16:01,680 DEBUG KNIME-Worker-0 WorkflowManager : Python Script 0:2 doBeforePreExecution
2015-05-12 15:16:01,680 DEBUG KNIME-Worker-0 NodeContainer : Python Script 0:2 has new state: PREEXECUTE
2015-05-12 15:16:01,680 DEBUG KNIME-Worker-0 WorkflowManager : Python Script 0:2 doBeforeExecution
2015-05-12 15:16:01,681 DEBUG KNIME-Worker-0 NodeContainer : Python Script 0:2 has new state: EXECUTING
2015-05-12 15:16:01,681 DEBUG KNIME-Worker-0 WorkflowFileStoreHandlerRepository : Adding handler 604d8bbc-6b2c-49f9-9026-2dbd7ccec112 (Python Script 0:2: <no directory>) - 3 in total
2015-05-12 15:16:01,681 DEBUG KNIME-Worker-0 LocalNodeExecutionJob : Python Script 0:2 Start execute
2015-05-12 15:16:12,913 DEBUG KNIME-Worker-0 Python Script : reset
2015-05-12 15:16:12,913 ERROR KNIME-Worker-0 Python Script : Execute failed: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
2015-05-12 15:16:12,914 DEBUG KNIME-Worker-0 Python Script : Execute failed: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
java.io.IOException: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
at org.knime.python.kernel.ProtobufConverter.createContainerFromProtobuf(ProtobufConverter.java:454)
at org.knime.python.kernel.PythonKernel.getDataTable(PythonKernel.java:483)
at org.knime.python.nodes.script.PythonScriptNodeModel.execute(PythonScriptNodeModel.java:96)
at org.knime.core.node.NodeModel.execute(NodeModel.java:706)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:555)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1131)
at org.knime.core.node.Node.execute(Node.java:927)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:125)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:248)
2015-05-12 15:16:12,916 DEBUG KNIME-Worker-0 WorkflowManager : Python Script 0:2 doBeforePostExecution
2015-05-12 15:16:12,916 DEBUG KNIME-Worker-0 NodeContainer : Python Script 0:2 has new state: POSTEXECUTE
2015-05-12 15:16:12,916 DEBUG KNIME-Worker-0 WorkflowManager : Python Script 0:2 doAfterExecute - failure
@patrick-winter-knime do you have an idea?
Hi @paulmueller!
It seems, that the problem was related to how we accessed the images in python. I added a template which demonstrates how to correctly access the images and updated the Python test-workflow.
So the issue should be fixed now.
Hi all,
I tried to run a test-flow (see https://github.com/knime-ip/knip-python-extensions/blob/master/testflows/Python.zip) which simply produces images with different dimensionalites and copies them in the python node. However, this didn't work a expected. See the following exception
I'm running it with the latest master. Any idea whats going on?
Cheers and thank you,
Christian
PS: you can simply import the testflow into your KNIME with File -> Import Workflow (Archive File).