Python Script Fails to Execute

I’m trying to run a workflow from my python script…

with knime.Workflow(workflow_path=workflow, workspace_path=workspace) as wf:

The workflow runs fine in the GUI but fails with:
ERROR KNIME-Worker-5 Node Execute failed: Could not create connection to database: Could not find driver class: oracle.jdbc.driver.OracleDriver

The drivers are configured in preferences and extensions are installed…

Has anyone else experienced this and know how to resolve the issue?
Using KNIME 3.7.2 / Python 3.6

Hi there!

Calling a workflow like this from Python should start KNIME in batch mode? It uses Dir of File parameter? I would guess he is not calling the workspace where you have preferences configured…


It does indeed appear to start KNIME in batch mode and runs in the specified directory. When I go to that directory and run KNIME manually, all is fine. When I run it in batch mode, it works fine. It only hits the error when running from Python. I’ve edited my preferences and I’ve tried exporting and re-importing preferences. Unfortunately, I don’t see an option to set the preferences within Python
with knime.Workflow(workflow_path=workflow, workspace_path=workspace) as wf:

Hi there,

Can you share the path format for both workflow and workspace?

Additionally have you tried running it without workspace_path argument. Assuming function starts KNIME in a batch mode and that it uses workflowDir option it should start workspace where you have configured preferences…

Also check your log. Maybe there will be some additional information.