Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting exception when calling PythonEngine.Initialize() second time after shutdown #2354

Open
BlueprismWorld opened this issue Apr 2, 2024 · 2 comments

Comments

@BlueprismWorld
Copy link

BlueprismWorld commented Apr 2, 2024

Environment

  • Pythonnet version: 3.0.3
  • Python version: 312
  • Operating System: Win11
  • .NET Runtime: 4.7.2

Details

  • Describe what you were trying to get done.
    i am getting error while calling PythonEngine.Initialize() method after calling PythonEngine.Shutdown()
Error message : Value cannot be null. Parameter name: typeName
  • If there was a crash, please include the traceback here.
Internal : Could not execute code stage because exception thrown by code stage:    at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context)
   at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at Python.Runtime.RuntimeData.RestoreRuntimeDataImpl()
   at Python.Runtime.RuntimeData.RestoreRuntimeData()
   at Python.Runtime.Runtime.Initialize(Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
   at Python.Runtime.PythonEngine.Initialize()
   at Python_VBO_x64_v3_0.Init()
   
 Inner Exception: Value cannot be null. Parameter name: typeName
 Exception message: Exception has been thrown by the target of an invocation.
@filmor
Copy link
Member

filmor commented Apr 2, 2024

Version 3.1.0.0 doesn't exist. Which one are you using exactly? The current master branch?

@BlueprismWorld
Copy link
Author

Yes from current master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants