← Winnitude! Search  ·  Reader Mode (1945 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 6 LINKS

Initialize() crash from .NET Framework application · Issue #2205 · pythonnet/pythonnet

Repository navigation

Initialize() crash from .NET Framework application  #2205


New issue

New issue

Closed as not planned

Closed as not planned
Initialize() crash from .NET Framework application #2205

Description

@anovik's profile anovik opened on Aug 1, 2023

Environment

  • Pythonnet version: 3.0.1
  • Python version: 3.10
  • Operating System: windows 11/10
  • .NET Runtime: NET Framework 4.6.1

Details

I am trying to call Python code from .NET Framework app but on some machines PythonEngine.Initialize() crashes.

Runtime.PythonDLL = "C:\\Python\\Python310\\python310.dll";
PythonEngine.Initialize();

Exception:

System.TypeInitializationException: 'The type initializer for 'Delegates' threw an exception.'

There are two inner exceptions:

DllNotFoundException: Could not load C:\Python\Python310\python310.dll.
Win32Exception: %1 is not a valid Win32 application

The path is correct and the dll exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions