Failure to run workflows with Database Connector (Oracle) from Jupyter Notebook

Hi,
After some testing with Jupyter Notebook integration with Knime I came across a peculiar problem specifically with the new DB Connector. In this case we tested both BigQuery and Oracle. IF the workflow has not been run fully and saved the workflow fails to execute from Jupyter Notebook. If the workflow is run and stored without resetting the workflow runs fine. Here is an example workflow. OBS: We do close the workflow as previously reported in another topic.

image

The errors generated in Jupyter Notebook end with this error message.

Thanks for any insights that other can help with.

Thanks,
Jan

ERROR:root:captured stdout: CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
Install location:
file:/c:/Program Files/KNIME/
Configuration file:
file:/c:/Program Files/KNIME/configuration/config.ini loaded
Configuration location:
file:/c:/Program Files/KNIME/configuration/
Framework located:
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
Loading extension: reference:file:javax.transaction_1.1.1.v201105210645.jar
eclipse.properties not found
Loading extension: reference:file:org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
eclipse.properties not found
Framework classpath:
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
file:/c:/Program Files/KNIME/plugins/
file:/c:/Program Files/KNIME/plugins/javax.transaction_1.1.1.v201105210645.jar
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
Debug options:
file:/C:/Users/Jan/.options not found
Time to load bundles: 6
Starting application: 1200
Start VM: -server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UseG1GC
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx8113m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\Program Files\KNIME\knime.exe
-name Knime
ā€“launcher.library C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834\eclipse_1630.dll
-startup C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
ā€“launcher.overrideVmargs
-debug
-application org.knime.product.KNIME_BATCH_APPLICATION
-data C:\Users\Jan\AppData\Local\Temp\tmp6rgmxpka\knime_data
-nosave
-workflowDir=C:\Users\Jan\knime-workspace\ParameterReading\Oracle DB Connector2
-option=13,outputPathOrUrl,C:\Users\Jan\AppData\Local\Temp\tmp6rgmxpka\output_13.json,String
-vm C:\Program Files\KNIME\plugins/org.knime.binary.jre.win32.x86_64_1.8.0.202-b08/jre/bin\server\jvm.dll
-vmargs
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UseG1GC
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx8113m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar

ERROR:root:captured stderr: Oct 01, 2019 2:04:29 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (158) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
Oct 01, 2019 2:04:29 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http-hc (159) [org.apache.cxf.transport.http.HTTPConduitFactory, org.apache.cxf.transport.ConduitInitiator]
log4j:ERROR Could not instantiate class [org.apache.hadoop.log.metrics.EventCounter].
java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter cannot be found by org.apache.log4j_1.2.15.v201012070815
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)

ā€¦

log4j:ERROR Could not instantiate appender named ā€œEventCounterā€.
ERROR main BatchExecutor Workflow is locked by another KNIME instance
Oct 01, 2019 2:04:31 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 158
Oct 01, 2019 2:04:31 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 159


FileNotFoundError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)
261 for output_json_filepath in expected_output_json_files:
ā€“> 262 with open(output_json_filepath) as output_json_fh:
263 single_node_knime_output = json.load(output_json_fh)

FileNotFoundError: [Errno 2] No such file or directory: ā€˜C:\Users\Jan\AppData\Local\Temp\tmp6rgmxpka\output_13.jsonā€™

During handling of the above exception, another exception occurred:

ChildProcessError Traceback (most recent call last)
in
1 with knime.Workflow(workflow_path=workflow,workspace_path=workspace) as wf:
----> 2 wf.execute()

C:\ProgramData\Anaconda3\lib\site-packages\knime.py in execute(self, live_passthru_stdout_stderr, output_as_pandas_dataframes)
382 save_after_execution=self.save_after_execution,
383 live_passthru_stdout_stderr=live_passthru_stdout_stderr,
ā€“> 384 output_as_pandas_dataframes=output_as_pandas_dataframes,
385 )
386 self._data_table_outputs[:] = outputs

C:\ProgramData\Anaconda3\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)
270 logging.error(f"captured stdout: {result.stdout}")
271 logging.error(f"captured stderr: {result.stderr}")
ā€“> 272 raise ChildProcessError(ā€œOutput from KNIME not foundā€)
273
274 if output_as_pandas_dataframes:

ChildProcessError: Output from KNIME not found

Hi @darknight ā€“

In your description, you specifically make the point that you have closed the workflow in the KNIME GUI before attempting to execute the workflow from Jupyter / Python:

Yet in the log you share, I am surprised to notice this appears:

This error is from the KNIME Batch Executor (not Jupyter or Python) and generally indicates that a workflow is still in use by another KNIME instanceā€¦somewhereā€¦

Is it possible that you attached a log from a different run?

Thanks,

Davin

1 Like

Hi there @darknight,

In case you are pretty sure that workflow you are calling is not opened/running somewhere check for .knimeLock file in workflow directory. If there delete it and try to run it again.

knimeLock

Br,
Ivan

Hi Davin,

Here is a fresh log just in case I copied the wrong one. I did check for the ā€œknimeLockā€ file and it was not in the workflow directory.

Thanks,
Jan

ERROR:root:captured stdout: CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot
Install location:
file:/c:/Program Files/KNIME/
Configuration file:
file:/c:/Program Files/KNIME/configuration/config.ini loaded
Configuration location:
file:/c:/Program Files/KNIME/configuration/
Framework located:
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
Loading extension: reference:file:javax.transaction_1.1.1.v201105210645.jar
eclipse.properties not found
Loading extension: reference:file:org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
eclipse.properties not found
Framework classpath:
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
file:/c:/Program Files/KNIME/plugins/
file:/c:/Program Files/KNIME/plugins/javax.transaction_1.1.1.v201105210645.jar
file:/c:/Program Files/KNIME/plugins/org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
Debug options:
file:/C:/Users/Jan/knime-workspace/ParameterReading/.options not found
Time to load bundles: 31
Starting application: 4167
WARN main ServerDBConnectorSettings Due to restrictive licence terms we can not distribute the Oracle driver with the KNIME Analytics Platform.
You can download the latest driver at http://www.oracle.com/technetwork/database/application-development/jdbc/downloads/index.html
WARN main ServerDBConnectorSettings To register the driver go to File->Preferences. In the preferences go to KNIME->Databases and register a new driver for the database type oracle by clicking on the Add button.
WARN main Node Please register a compatible driver via the KNIME preference page. (For details see the log file)
Start VM: -server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UseG1GC
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx8113m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
-os win32
-ws win32
-arch x86_64
-launcher C:\Program Files\KNIME\knime.exe
-name Knime
ā€“launcher.library C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834\eclipse_1630.dll
-startup C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
ā€“launcher.overrideVmargs
-debug
-application org.knime.product.KNIME_BATCH_APPLICATION
-data C:\Users\Jan\AppData\Local\Temp\tmpwjii69zi\knime_data
-nosave
-workflowDir=C:\Users\Jan\knime-workspace\ParameterReading\Oracle DB Connector2
-option=13,outputPathOrUrl,C:\Users\Jan\AppData\Local\Temp\tmpwjii69zi\output_13.json,String
-vm C:\Program Files\KNIME\plugins/org.knime.binary.jre.win32.x86_64_1.8.0.202-b08/jre/bin\server\jvm.dll
-vmargs
-server
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UseG1GC
-Dsun.net.client.defaultReadTimeout=0
-XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot
-Xmx8113m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dsun.awt.noerasebackground=true
-Dequinox.statechange.timeout=30000
-Djava.class.path=C:\Program Files\KNIME\plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar

ERROR:root:captured stderr: Oct 07, 2019 10:10:02 AM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (158) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
Oct 07, 2019 10:10:02 AM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http-hc (159) [org.apache.cxf.transport.http.HTTPConduitFactory, org.apache.cxf.transport.ConduitInitiator]
log4j:ERROR Could not instantiate class [org.apache.hadoop.log.metrics.EventCounter].
java.lang.ClassNotFoundException: org.apache.hadoop.log.metrics.EventCounter cannot be found by org.apache.log4j_1.2.15.v201012070815
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:179)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:320)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:121)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:664)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
at org.apache.log4j.LogManager.(LogManager.java:125)
at org.apache.log4j.Logger.getLogger(Logger.java:105)
at org.knime.core.node.NodeLogger.(NodeLogger.java:568)
at org.knime.core.node.NodeLogger.getLogger(NodeLogger.java:601)
at org.knime.core.node.NodeLogger.getLogger(NodeLogger.java:586)
at org.knime.core.util.FileUtil.(FileUtil.java:117)
at org.knime.core.node.NodeLogger.copyCurrentLog4j(NodeLogger.java:431)
at org.knime.core.node.NodeLogger.initLog4J(NodeLogger.java:369)
at org.knime.core.node.NodeLogger.(NodeLogger.java:316)
at org.knime.workbench.core.KNIMECorePlugin.(KNIMECorePlugin.java:97)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:763)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:716)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
at org.knime.product.headless.KNIMEBatchApplication.start(KNIMEBatchApplication.java:74)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
log4j:ERROR Could not instantiate appender named ā€œEventCounterā€.
ERROR main Node Loading model settings failed: Could not find the [oraclecd] database driver.
org.knime.core.node.InvalidSettingsException: Could not find the [oraclecd] database driver.
at org.knime.database.node.connector.DBSessionSettings.validatePrimaryIds(DBSessionSettings.java:105)
at org.knime.database.node.connector.DBSessionSettings.validateSettings(DBSessionSettings.java:253)
at org.knime.database.node.connector.server.ServerDBConnectorSettings.validateSettings(ServerDBConnectorSettings.java:289)
at org.knime.database.node.connector.AbstractDBConnectorNodeModel.validateSettingsInternal(AbstractDBConnectorNodeModel.java:229)
at org.knime.database.node.DBNodeModel.validateSettings(DBNodeModel.java:183)
at org.knime.core.node.Node.validateModelSettings(Node.java:642)
at org.knime.core.node.workflow.FileNativeNodeContainerPersistor.loadNCAndWashModelSettings(FileNativeNodeContainerPersistor.java:222)
at org.knime.core.node.workflow.FileSingleNodeContainerPersistor.loadNodeContainer(FileSingleNodeContainerPersistor.java:259)
at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:7865)
at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:7756)
at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:7881)
at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:7756)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:7710)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:7631)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:7604)
at org.knime.core.node.workflow.WorkflowManager.loadProject(WorkflowManager.java:7449)
at org.knime.core.node.workflow.BatchExecutor.loadWorkflow(BatchExecutor.java:740)
at org.knime.core.node.workflow.BatchExecutor.runOne(BatchExecutor.java:907)
at org.knime.core.node.workflow.BatchExecutor.runAll(BatchExecutor.java:889)
at org.knime.core.node.workflow.BatchExecutor.mainRun(BatchExecutor.java:671)
at org.knime.product.headless.KNIMEBatchApplication.runBatchExecutor(KNIMEBatchApplication.java:127)
at org.knime.product.headless.KNIMEBatchApplication.start(KNIMEBatchApplication.java:80)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Oct 07, 2019 10:10:17 AM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 158
Oct 07, 2019 10:10:17 AM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 159


FileNotFoundError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)
261 for output_json_filepath in expected_output_json_files:
ā€“> 262 with open(output_json_filepath) as output_json_fh:
263 single_node_knime_output = json.load(output_json_fh)

FileNotFoundError: [Errno 2] No such file or directory: ā€˜C:\Users\Jan\AppData\Local\Temp\tmpwjii69zi\output_13.jsonā€™

During handling of the above exception, another exception occurred:

ChildProcessError Traceback (most recent call last)
in
1 with knime.Workflow(workflow_path=workflow,workspace_path=workspace) as wf:
----> 2 wf.execute()

C:\ProgramData\Anaconda3\lib\site-packages\knime.py in execute(self, live_passthru_stdout_stderr, output_as_pandas_dataframes)
382 save_after_execution=self.save_after_execution,
383 live_passthru_stdout_stderr=live_passthru_stdout_stderr,
ā€“> 384 output_as_pandas_dataframes=output_as_pandas_dataframes,
385 )
386 self._data_table_outputs[:] = outputs

C:\ProgramData\Anaconda3\lib\site-packages\knime.py in run_workflow_using_multiple_service_tables(input_datas, path_to_knime_executable, path_to_knime_workflow, input_service_table_node_ids, output_service_table_node_ids, save_after_execution, live_passthru_stdout_stderr, output_as_pandas_dataframes, input_json_filename_pattern, output_json_filename_pattern)
270 logging.error(f"captured stdout: {result.stdout}")
271 logging.error(f"captured stderr: {result.stderr}")
ā€“> 272 raise ChildProcessError(ā€œOutput from KNIME not foundā€)
273
274 if output_as_pandas_dataframes:

ChildProcessError: Output from KNIME not found

Hi Jan ā€“

Cool ā€“ this log does not have the error complaining about the workflow being locked. Looking through the log, this line about failing to ā€œfind the [oraclecd] database driverā€ grabs my attention:

In combination with that error, I suspect that this warning (near the beginning of the log) is an important clue:

Could you try checking in the KNIME GUI to see if the Oracle driver really does appear to be registered properly? I would look inside the KNIME Preferences for this. It sounds like something is not set up quite right but I do not know what to tell you to look for more specifically. I am hoping you will spot something unexpected in the preferences.

Davin

Hi Davin,
Yes, the drivers is installed correctly since I can run the workflow. The preference file, knime.ini, has no reference to the drivers. I used custom profiles to manage the drivers. Unclear what to check if workflow runs.
Thanks,
Jan

Hi Jan ā€“

In the local KNIME installation, how do you select which customization profile to use? Do you switch profiles via the preferences page (KNIME->Customization profile) or do you modify your knime.ini or do you have a custom Eclipse plugin installed for this purpose? (I believe those are the only 3 ways to specify which customization profile to use, per https://docs.knime.com/2019-06/server_admin_guide/index.html#client-side-setup)

Depending upon your answer, there are several ways we can proceed.

Davin

Hi Davin,
We use KNIME->Customization profile. The method works and I am able to run the workflow. Not sure how Jupyter Notebook kick starts the Knime instance and if the same profiles are automatically included based on Customization profile.
Thanks,
Jan

Hi Jan ā€“

The knimepy package currently does not expose support for customization profiles (arguably because the enhancement to work with remote KNIME servers has not yet been accepted). In v0.9.5 of knimepy (what youā€™re using), it launches KNIME with the configuration specified in your knime.ini file and so does not load any customization profile that you have selected in the KNIME GUI. I believe this is why you see the error from KNIME complaining about not finding a registered Oracle database driver.

A couple of options for you on how to proceed:

  1. I have created an experimental version of knimepy, labelled v0.9.5_mod1, which exposes an ability to provide the missing command-line flags so that you can specify what customization profile you wish to use. To use this experimental version, download the knime.py file from where it lives on github (https://github.com/knime/knimepy/blob/enh_supplemental_cmdline/knime.py) and in your Python code you will need to specify the customization profile info in the following way (replacing the url and remote profile name with your correct url/name):
with knimepy.Workflow(r"C:\Users\Jan\knime-workspace\ParameterReading\Oracle DB Connector2") as wf:
    wf.supplemental_cmdline = "-profileLocation http://knime-server:8080/knime/rest/v4/profiles/contents -profileList base,linux"
    wf.data_table_inputs = [ ...blah... ]
    wf.execute()
    outputs = wf.data_table_outputs[:]
  1. At least for now, register the Oracle database driver locally (outside of the customization profile) and wait for a future version of knimepy that is designed to support interactions with the remote server.

If you choose option 1 and it works and you like it, we might be able to get it into a release of knimepy more quickly. If you choose option 2, I totally understand.

I have created an issue in the knimepy repo on github to track this experiment: https://github.com/knime/knimepy/issues/22

Davin

2 Likes

Hi Davin,
I tried to test option (1) which I would prefer and the knime.py link does not give a python package. Is it possible to get a ā€œknimeā€ package instead so I can easily import into my machine or instructions how to create the package?
Thanks