Tunny python 3 compatibility Error

Hello @hiron,

I am encountering a runtime error when running Tunny in Rhino 8 / Grasshopper on a definition that contains Python 3 components.

Environment

  • Rhino: Rhino.Inside 8 Educational

  • Tunny: v1.4.2

  • Grasshopper definition contains Python 3 component(s)

Observed behavior

When opening Tunny, it detects Python 3 code in the Grasshopper document and shows the following warning:

“Python3 component” detected in the Grasshopper document.
Tunny may crash Rhino when optimizations are performed due to compatibility issues with Python 3 components.
If possible, replace such code with C# or VB implementations.
Do you want to continue displaying this warning?

When optimization starts, Tunny shows the following runtime error dialog:

"Tunny runtime error:
Please send below message (gh file if possible) to Tunny support.
If this error occurs, the Tunny solver will not work after this unless Rhino is restarted.

Source: Tunny
Message: Could not load file or assembly ‘Python.Runtime, Version=3.0.5.0, Culture=neutral, PublicKeyToken=5000fea6cba702dd’. A strongly-named assembly is required. (0x80131044)"

Technical interpretation

From the dialog text, the issue appears to be related to loading Python.Runtime during optimization in a Grasshopper definition that includes Python 3 components.

Questions

  1. Is this a known limitation of Tunny v1.4.2 when Python 3 components are present in the Grasshopper document?

  2. Is the failure specifically related to Python.Runtime version 3.0.5.0 and strong-name assembly loading?

  3. Does Tunny require a specific Python runtime configuration to avoid this issue?

  4. Are there known conflicts with Rhino 8 Python 3 components or duplicate Python.Runtime.dll assemblies?

  5. Besides converting Python components to C# or VB, is there any supported workaround?

    Attached screenshots

    • the Python 3 component detection warning

    • the Tunny runtime error dialog

Thank you.

Hi @Ahmed_Mady

This is a known issue where the window appears. Although the window description states that Rhino has crashed, this also includes instances where optimization does not function.

We understand that this issue is caused by a conflict between the Python.Runtime included in Rhino and the Python.Runtime included in Tunny. We are currently investigating to find a solution, but there is no workaround at present other than replacing the components with VB or C# components.

Some users have reported that it works in version 1.1.