[INFO] - PythonEngine: Initializing Python engine.\n[ERROR]: Object reference not set to an instance of an object.\n[TRACE]: at Python.Runtime.ClassManager.GetClassInfo(Type type, ClassBase impl)\n at Python.Runtime.ClassManager.InitClassBase(Type type, ClassBase impl, ReflectedClrType pyType)\n at Python.Runtime.ReflectedClrType.GetOrCreate(Type type)\n at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)\n at Python.Runtime.ModuleObject.LoadNames()\n at Python.Runtime.ImportHook.UpdateCLRModuleDict()\n at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)\n at Python.Runtime.PythonEngine.Initialize()\n at cpGames.VSA.ToolAPI.<InitializePythonEngineAsync>d__2.MoveNext() in ToolAPI.cs:line 69 // PythonEngine.Initialize(); call\nWhy you close my issue?
\nHere's your fix:
\ninternal static bool ShouldBindEvent(EventInfo ei)\n {\n var mb = ei.GetAddMethod(true);\n if (mb == null)\n {\n return false;\n }\n return ShouldBindMethod(mb);\n }\nCheck your nulls, thank me later.
","upvoteCount":2,"url":"https://github.com/pythonnet/pythonnet/discussions/2405#discussioncomment-9850990"}}}-
Environment
Details
I am trying to use pythonnet package in a VSIX Visual Studio extension.
|
Beta Was this translation helpful? Give feedback.
-
|
Why you close my issue? Here's your fix: Check your nulls, thank me later. |
Beta Was this translation helpful? Give feedback.
-
|
Hello , I have the same issue, I am trying to use pythonnet package in a VSIX Visual Studio extension. I am going to apply this fix above made by @cpgames and see if the problem persists. Do you intend to release this fix in a future version of pythonnet ? Regards, |
Beta Was this translation helpful? Give feedback.
Why you close my issue?
Here's your fix:
Check your nulls, thank me later.