Python engine automatically updating to CPython3

Can you send a copy of the graph as it was in 2022?

Legend_Doors.dyn (920.2 KB)

I might be missing something, but I donā€™t see any Python node in that graphā€¦ Are you working with python in a custom node?

theres python in the place legend component node

Thanks - looking into that now.

1 Like

Yep - the designtech package hasnā€™t been updated since the 1.3 days. That puts this package at 5 years since it was last updated - and as a result the file structure of the .dyn is xml formatted instead of json formatted. You can see this for yourself by checking he file in a text editor. As a result itā€™s likely best to look for an alternative for this tech debt in your workflow, either by building your own version or by finding an alternative package to accomplish the same.

As an alternative, the code @c.poupin posted above should bulk upgrade the package to a 2.x format, but you will have to ensure that all consumers of your code utilize the updated version going forward, as default use of the source package will break the system for them just as well as it does for you. Itā€™s also worth noting that other items may break in the update.

1 Like

Thanks Jacob, so if I remove 1.3 packages other nodes will stop switching to python 3? Or I have to rebuild the script without it? :thinking:

try to update the Genuis Loci package, this should resolve the bug for this node

2 Likes

Iā€™d remove the 1.3 packages and update to the latest version of the remainder so that nothing has to be updated. I think this will fix the issue (while also patching a bunch of errors for you and making things better overall).

1 Like

just for reference Iā€™ve filed (1) in my list above as dyn-5393

3 Likes

Hi Jacob, how do you tell what packages are from 1.3 dynamo?

Theyā€™ll be in XML format instead of JSON.

The easiest way is to check the first character. I canā€™t recall the markers exactly, but if you check the first line of a Dynamo 1.x graph and the first line of a Dynamo 2.x graph in a text editor and it should be clear.

So the packages in the graph dictate if itll be XML or JSON? So if I remove the 1.X and close the graph and open again, itll revert to JSON? I cant find what your saying the first line of a graph sorry. Happy Birthday BTW if it is! Also just thinking all my graphs got read as a JSON in dynamo when I was investigating them for packages used.
image

The custom nodes (.dyf) in a package will have a similar structure. I know clockwork 1.x is the old XML to see that structure. Upgrading the custom nodes is the missing key (from what I can see).