Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unhandled exception. System.InvalidOperationException: GIL must always be released#2577

tarunsk1998 started this conversation inGeneral
Discussion options

I have an dotnet application that uses pythonnet to invoke a python script.

I am facing the below issue while I am testing the application.

Error:
Unhandled exception. System.InvalidOperationException: GIL must always be released, and it must be released from the same thread that acquired it.
at Python.Runtime.Py.GILState.Finalize()

There is another error printing in the logs:
error message: The type initializer for 'Delegates' threw an exception.

I am facing this issue for both python 3.11 and 3.12 versions.

Has anyone faced this issue or help me debug this issue?

You must be logged in to vote

Replies: 2 comments

This comment has been minimized.

Comment options

Same issue - 3.9.10; also tried virtually every method I can think of to control GIL state and still get it.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
3 participants
@tarunsk1998@iamabigartist@myleswortham
Converted from issue

This discussion was converted from issue #2544 on April 11, 2025 04:55.


[8]ページ先頭

©2009-2025 Movatter.jp