i am creating new nodes in Knime with Python. In those nodes i create different types of plots with plotly and make those available as PNG/SVG at the output of the Node. The Problem is that this only works for me with older versions of kaleido(e.g 0.1.0). If i use newer versions the node gets stuck on 10% progress and the workflow becomes unresponsive. That would not be a problem in Development but when i try to bundle it with the channel i am allowed to use (which is conda-forge) It doesnt work. Here again it does not work with newer versions of python-kaleido and kaleido-core because the node gets stuck. And for older versions it throws an error in the bundling process which says that it can not find a version for kaleido-core 0.1.0 that is needed by python-kaleido 0.1.0. I already checked and as far as i can tell both versions should be available on the conda-forge channel.
I am using Knime 5.3.3, Plotly=6.0.1, python-kaleido=0.1.0 and kaleido-core=0.1.0 in development. Does anyone know a solution to this issue?
Thanks for reporting the issue! Sorry to hear youâre having trouble with kaleido, we know that configuring a working Python environment can be trickyâŚ
Could you share the whole environment YAML that you are using, as well as a piece of code where you call kaleido, so that we can try to reproduce the issue?
I just tried and might have found the issue why bundling doesnât work with kaleido-core=0.1.0: there is no such package for Apple Silicon macs, and we try to make the extension work on all platforms.
So it would be interesting to know why the node gets stuck with a newer version. Do you have a code snippet that we could execute to reproduce the âgetting stuckâ case?
Are you developing your nodes open source? Then feel free to share a GitHub link to a branch or so
we are delevoping on Windows. Here is a smaller example: @knext.node(name=âPie Chartâ, node_type=knext.NodeType.VISUALIZER, icon_path=âicons/PieChart.pngâ, category=my_category) @knext.input_table(name=âInput Dataâ, description=âWe read data from hereâ) @knext.output_image(name=âImage Outputâ, description= âGenerated Plot as pngâ) @knext.output_view(name=âOutput Viewâ, description=âdescriptionâ)
class Piechart_Node():
ââ"
This node creates a piechart to show value distribution
ââ"
values = knext.ColumnParameter(label=âChoose column values for chartâ, description=âChoose a column for the valuesâ)
names = knext.ColumnParameter(label=âChoose column with names for chartâ, description=âChoose a column for the names of the sectionsâ)
title = knext.StringParameter(label=âTitleâ, description=âEnter title of the plot hereâ)
This is how we convert the image and send it to the nodes output. Unfortunately i am not allowed to give information about the colors_data etc. but i guess those aspects are not relevant anyway. When i use kaleido-core, and python-kaleido in version 0.1.0 this work fine. With newer versions it gets stuck. Here is my environment.yml:
name: knime_python_env_53
channels: