Python View inside component generates view intermittently

Hi, I’m trying to encapsulate a Python View generating a matplotlib figure into a simple component which includes some configuration. In both KNIME 4 and 5 I have the following problem.

Sometimes, the placed component will work as expected and the interactive view will open a window showing the matplotlib figure. I can reset and re-execute or reopen the display and it returns perfectly. However, I can delete the component and replace it with a fresh instance and sometimes it will instead open a blank window and immediately open a save file dialog box asking me to save a HTML file. If I do, there are a few tags but the body is blank. I think I’m using the built-in browser.

Any ideas? Let me know if you want to see code but it’s quite straightfoward.

Thanks!

@lstant welcome to the KNIME forum. Maybe you can check this example and see if this does work or has the same problems.

Also if you could share your example without spelling any secrets this could also help.

1 Like

Thanks. Your example works fine. I’ve attached my code, it’s all open source anyway.
There’s a component output node included but I don’t imagine that’s doing any harm. I would assume it must be something related to my knime configuration, I just wonder if anyone else saw this issue.

PlotDemo.knwf (433.2 KB)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.