Closed HackXIt closed 4 months ago
I would assume there are some incompatibilities, but I am unable to determine at the moment if it is either my python version or the pythonnet version or my .NET version.
I simply followed the README which showed the python 3.11 tag, assuming it will work.
Ah found it I think...
import clr
Failed to initialize pythonnet: System.NotSupportedException: Python ABI v3.11.8 is not supported: Searching for Python.Runtime.TypeOffset311, found TypeOffset,TypeOffset310,TypeOffset37,TypeOffset38,TypeOffset39.
at Python.Runtime.Native.ABI.Initialize(Version version)
at Python.Runtime.Runtime.Initialize(Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
at Python.Runtime.PythonEngine.InitExt()
at Python.Runtime.Loader.Initialize(IntPtr data, Int32 size)
at Python.Runtime.Native.ABI.Initialize(Version version)
at Python.Runtime.Runtime.Initialize(Boolean initSigs)
at Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
at Python.Runtime.PythonEngine.InitExt()
at Python.Runtime.Loader.Initialize(IntPtr data, Int32 size)Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\RINI\#Entwicklung_TechNICK\0_Git_Stash\Testcenter.RobotSuites.HCS.Solution\Testcenter.RobotSuites.HCS.Visocall-IP\.venv\Lib\site-packages\clr.py", line 6, in <module>
load()
File "C:\Users\RINI\#Entwicklung_TechNICK\0_Git_Stash\Testcenter.RobotSuites.HCS.Solution\Testcenter.RobotSuites.HCS.Visocall-IP\.venv\Lib\site-packages\pythonnet\__init__.py", line 140, in load
raise RuntimeError("Failed to initialize Python.Runtime.dll")
RuntimeError: Failed to initialize Python.Runtime.dll
Hi @HackXIt
your Python.Net version is an pre release version 3.0.0rc6 from 20.07. 2022.
Did you try an release version like 3.0.1, 3.0.2 or 3.0.3?
Can you upgrade this version because we test only on full releases from python.net
Hi @HackXIt
your Python.Net version is an pre release version 3.0.0rc6 from 20..07. 2022.
Did you try an release version like 3.0.1, 3.0.2 or 3.0.3?
Can you upgrade this version because we test only on full releases from python.net
I can do that, I was using poetry add robotframework-flaui
and it automatically installed this pre release version.
I fixed it, it was due to my python version constrained, which was too small of a version range for the newer python.net to be considered.
I get the following error when attempting to import the library:
My testcase:
Versions used: Python 3.11.8 Robot Framework 7.0.1 robotframework-flaui 3.2.0 pythonnet 3.0.0rc6
I have the following .NET framework versions installed: (via SDK)