KNIME to Python exporter UI

Dear KNIME community,

I am glad to present a new feature of the knime2py open-source project — knime2py now has a UI component node.

This is the second post about knime2py (the first is here: KNIME to Python exporter ).

Instead of creating a standalone UI, I decided to use the KNIME UI. You can run the knime2py exporter directly from your KNIME workflow using a custom KNIME2PY component node:

You can drag & drop the component from its page directly into your workflow (thanks to the KNIME team). Once the node is downloaded, you can use it like any other node.

The configuration window has several mandatory fields:

  1. Path to knime2py application — download the .pex distribution for your OS from the Releases page ( Releases · vitaly-chibrikov/knime2py · GitHub ) and set this path.

  2. Path to your KNIME project — any KNIME project (not only the one containing the KNIME2PY node).

  3. Output directory — where knime2py will place generated files.

  4. Artifacts to generate — select what to emit; at least one of .py or .ipynb must be selected.

If everything is configured correctly, you can execute the node and receive:

  • the generated files in the output directory,

  • a JSON execution report on the first output port,

  • or error messages on the second output port.

I’m ready to discuss your experience and any issues you may have.

9 Likes

Hi Vitalii, I came across your project and really interested to use it. But as a newbie I am totally lost on how to run it.

All I have is Knime files but I am still figuring out how to use your tool to convert it to python code

Is it possible for you to help a total newbie here?

Thank you very much

I found your code to be in .pex version and I try to run it from python but everytime I run it from python it gave me syntax error as follow :

py test.pex
File “”, line 1
py test.pex
^^^^
SyntaxError: invalid syntax

Hello, and thank you for your interest. I’m glad to hear the project has users.

If you are going to use the KNIME2Py UI, you don’t need to run it from the command line—you can use the KNIME2Py Component instead.

I’ve recorded a UI tutorial
https://www.youtube.com/watch?v=Dz6HIWxOM44

Could you please try it and let me know where the problem occurs? I’ll do my best to help.

We can continue the discussion here (it may be useful for the KNIME community), or you can reach me on Discord: https://discord.gg/EzPGQVzn

4 Likes

Ohhh that is really helpful with the videos but following your guide it seems that I am still finding errors during the execution…as below image :

I wonder is it because of the KNIME2PY component need to be connected to some input and output nodes?

Thanks you have been great help

Hello!
It is very interesting error message.
It looks like Python Script (I have one inside the component KNIME2PY) in you KNIME can return only one output table. And the same Python Script node in my KNIME version can return multiple.

I opened an issue about it:

Could you please specify the version of KNIME you use?
I have 5.5.1.

Anyway, I released a (possible) fix for you. Try to delete your current KNIME2PY node and download a new one

Thank you for collaboration!

1 Like

Dear Vitalii, It seemed I am currently using Knime 5.8.0

Here are the screenshot :

1 Like

Good. It is even more interesting.
Could you please send me more screenshots?

  1. Open the dialog with the version

And “Installation Details” in it.

  1. Filter all by the word “python” like here:

What do you see?
Do you have KNIME Python Extension Development (Labs)?

1 Like

Dear Vitalii,

Thanks for the new updated components, I have tried running the component again and no Python output is to be found but there are several errors as below :

And for the last info you request is as below :

I tried running again and the component executed successfully but no python result was found…

The stderror output is as below :

Traceback (most recent call last): File “”, line 198, in _run_module_as_main File “”, line 88, in _run_code File “C:\Users\lwx827409\knime-workspace\k2p-windows.pex\_main_.py”, line 244, in File “C:\Users\lwx827409\knime-workspace\k2p-windows.pex\_main_.py”, line 224, in boot File “C:\Users\lwx827409\knime-workspace\k2p-windows.pex\_main_.py”, line 95, in _ensure_pex_installed_ File “C:\Users\lwx827409\knime-workspace\k2p-windows.pex\.bootstrap\pex\layout.py”, line 712, in ensure_installed File “C:\Users\lwx827409\knime-workspace\k2p-windows.pex\.bootstrap\pex\layout.py”, line 361, in _ensure_installed OSError: [WinError 1314] A required privilege is not held by the client: ‘..\\..\\..\\bootstraps\\0\\f5c4b6459eee9e65ec113eea4644e8f2699cf546’ → ‘C:\\Users\\lwx827409\\AppData\\Local\\pex\\Cache\\unzipped_pexes\\3\\86965d676572479dae0c3e9dcd04b0e07c623600.lck.work\\.bootstrap’

It explains the previous problem. My changes fixed it.

Current problem is on the next step – pex run.

This issue is specific to PEX. PEX attempts to create symlinks. That is fine on Unix-based OSes (macOS, Linux) but problematic on Windows, where creating symlinks requires administrator privileges. I’ve addressed this in the latest PEX build and in the KNIME2PY node.

Please update both the PEX package and the node, and try again.

If the problem persists, the workaround is to run KNIME as Administrator and execute KNIME2PY once. On the first run, PEX will create the required links; subsequent runs should work without elevated rights.

Thank you for your patience, your contribution to the project is significant.

Hello! I’ve added Windows .exe builds in addition to the .pex.

Please update the binary path and the UI node. Use the .exe exactly as the .pex.

Two options:

  • Nuitka – fast and small

  • PyInstaller – larger, generally more stable

I tested the Nuitka build on Windows and it works.

Hi Vitalii, Happy New Year 2026, sorry I was busy in end of year projects and after that have many plans for the holiday too…so only now I am reminded of it and check back again.

I tried again but it seems my knowledge is still too limited and seem to met so much troubles haha.

so lets start with the progress so far :slight_smile:

  1. I downloaded the new exe files (both Nuitka and PyInstaller) after running it normally and with administrator right, it doesnt do anything at all.
  2. Thus, I tried opening Knime and it asked me to update several extensions –> I update it and wait for long time.
  3. While waiting for Extensions to finished updating, I try running the KNIME2PY components again in my Knime workbook and it runs as error…when I checked the error, it told me that it didnt found the conda environment, so I checked my anaconda environment and update the path to it in Knime preferences setting.
  4. during that time the Extension have finished updated, so I thought it would be a good idea to restart knime
  5. But after I finished restarting knime it gave me this error and I cannot opened Knime at all.

  6. I checked the Log and these are what it said :


!SESSION 2026-01-02 11:59:32.629 -----------------------------------------------
eclipse.buildId=unknown
java.version=21.0.9
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

!ENTRY org.eclipse.equinox.simpleconfigurator 4 0 2026-01-02 11:59:33.019
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator.
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:854)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:775)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1057)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:387)
	at org.eclipse.osgi.container.Module.doStart(Module.java:639)
	at org.eclipse.osgi.container.Module.start(Module.java:498)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2073)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:143)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2064)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2006)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1967)
	at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:274)
	at org.eclipse.osgi.container.Module.doStart(Module.java:639)
	at org.eclipse.osgi.container.Module.start(Module.java:498)
	at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:198)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:463)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:482)
	at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:367)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:267)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:627)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)
Caused by: java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
	at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:93)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:189)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:204)
	at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:63)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:833)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:825)
	... 24 more
Root exception:
java.lang.IllegalStateException: The System Bundle was updated. The framework must be restarted to finalize the configuration change
	at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:93)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:189)
	at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:204)
	at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:63)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:833)
	at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:825)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:775)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1057)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:387)
	at org.eclipse.osgi.container.Module.doStart(Module.java:639)
	at org.eclipse.osgi.container.Module.start(Module.java:498)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2073)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:143)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2064)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2006)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1967)
	at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:274)
	at org.eclipse.osgi.container.Module.doStart(Module.java:639)
	at org.eclipse.osgi.container.Module.start(Module.java:498)
	at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:198)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:463)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:482)
	at org.eclipse.osgi.launch.Equinox.start(Equinox.java:139)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:367)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:267)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:627)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)

!ENTRY org.eclipse.osgi 4 0 2026-01-02 11:59:33.022
!MESSAGE Bundle org.eclipse.equinox.simpleconfigurator_1.5.200.v20240209-1053 [1] is not active.

!ENTRY org.eclipse.osgi 4 0 2026-01-02 11:59:33.047
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:86)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:627)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)

Now I am kinda frustrated after the new year, it kinda drained my energy and emotion…hahaha

Hello!

As I see from you log your update went wrong.

The message you provided indicates that the KNIME/Eclipse runtime did not complete an update cleanly and now starts with an inconsistent OSGi configuration

“The System Bundle was updated. The framework must be restarted to finalize the configuration change”

It can be fixed by clearing KNIME’s cached configuration or reinstalling cleanly.

I recommend you to download and install the last version of KNIME to another directory (you will have two KNIMEs). Be sure you are not installing it to Program Files. Run the new one, open the project with KNIME2PY. If it can be opened, the problem is not in the component (I am sure it is not).

Anyway, we will fix your environment.

There are reports about it like:

and even

But they are very old. So, I don’t think Eclipse will fix it. We need to find a workaround.

Thanks for Reply Vitalii…I am installing Knime clean from beginning again…we can open Knime now but it still have some error as below :

Hi @HanDoko , does this help?

1 Like

Hello!
It looks like Python Script node inside KNIME2PY component couldn’t start or handshake with its Python process.
You mentioned that you use conda. You can do this in command line:

conda create -n knime-py311 python=3.11 -y
conda activate knime-py311
pip install knime pandas pyarrow

And select new conda in KNIME preferences:
KNIME → Preferences → Python → Conda → select knime-py311

Can I create Python code for you based on your KNIME workflow?
You can share your KNIME project with me and send a small sample of your data (up to 100 rows for debugging), and I will provide a Python script and a notebook.

At least we will know that the result works for you, and that your suffering was not pointless.

1 Like

Hi Dear @vitalii,

Sorry It have been a while, I have been occupied by new tasks and many other events in my life, :sweat_smile:

I think I like your solution and I tried, but it still gave me a dead end so far

I have run all the 3 commands you mentioned before in my condas command prompt and also set my knime python preferences as you mentioned as below :slight_smile: :

Hello!

I should admit that command-line solution and KNIME-component solution as UI for knime2py are not convenient for all users.

I am working on a web service for knime2py: a simple site where you can upload your workflow and download the generated .py files.

Give me some time, I plan to finish it in the near future.

2 Likes