Skip to content

"the type initializer for Delegates threw an exception" - using Create Runtime #2106

Answered by ncguilbeault
vruetten asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vruetten ,

It's cool to see you are trying out the Bonsai - Python scripting package! In my experience, the “Delegate” error in Bonsai often means that Bonsai can’t locate or load the Python DLL correctly. This is frequently caused by issues in the system PATH or conflicts between multiple Python installations. Below are some steps I recommend to help get started:

Check for existing Python paths

Open a Command Prompt (or PowerShell) and type:

where python

This should list all instances of python.exe that your system sees. If there’s more than one, it's possible that this can create problems when Bonsai tries to load the DLL.

Uninstall / remove conflicting Python installations

Bonsai w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vruetten
Comment options

Answer selected by vruetten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2100 on January 14, 2025 07:25.