When I use the Python code node, and try to print to the browser console using print function, I can’t figure out how to print objects. I think Pyodide returns a JS object, so all I get is:
[object Object]
How can I get the object printed?
What is the error message (if any)?
N/A
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Hi, yes that works because your printing scalar values, but when you print a Python dict (an object in JS) it doesn’t work. In JS you’d use JSON.stringify() to convert the object to a string and make it visible in the console. But in this case we have JSON → Python → JS Object.
If I try to print the individual values it works, but printing an object, like each model in the screenshot above produces [object Object] in the console.
I can help you resolve this. The [object Object] output usually happens due to how Pyodide handles Python objects in the browser. I’ll set up the Python code node properly so your objects are printed in a readable format using the right serialization method.
I’ll make sure you get clear, structured output in the console. Looking forward to fixing this for you! Book a call Upwork Profile