You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
On some machines, PythonNet fails to load. This is presented in Salt by unzipping a Relenv OneDir build and then running .\salt-call.exe --version. You will see the following stacktrace:
PS C:\Temp\salt> .\salt-call.exe --version
Traceback (most recent call last):
File "C:\Temp\salt\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Temp\salt\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Temp\salt\salt-call.exe\__main__.py", line 7, in <module>
File "C:\Temp\salt\lib\site-packages\salt\scripts.py", line 438, in salt_call
import salt.cli.call
File "C:\Temp\salt\lib\site-packages\salt\cli\call.py", line 3, in <module>
import salt.cli.caller
File "C:\Temp\salt\lib\site-packages\salt\cli\caller.py", line 12, in <module>
import salt.channel.client
File "C:\Temp\salt\lib\site-packages\salt\channel\client.py", line 13, in <module>
import salt.crypt
File "C:\Temp\salt\lib\site-packages\salt\crypt.py", line 26, in <module>
import salt.payload
File "C:\Temp\salt\lib\site-packages\salt\payload.py", line 12, in <module>
import salt.loader.context
File "C:\Temp\salt\lib\site-packages\salt\loader\__init__.py", line 15, in <module>
import salt.config
File "C:\Temp\salt\lib\site-packages\salt\config\__init__.py", line 22, in <module>
import salt.utils.network
File "C:\Temp\salt\lib\site-packages\salt\utils\network.py", line 32, in <module>
import salt.utils.win_network
File "C:\Temp\salt\lib\site-packages\salt\utils\win_network.py", line 56, in <module>
import clr
File "C:\Temp\salt\lib\site-packages\clr.py", line 6, in <module>
load()
File "C:\Temp\salt\lib\site-packages\pythonnet\__init__.py", line 143, in load
if func(b"") != 0:
File "C:\Temp\salt\lib\site-packages\clr_loader\types.py", line 64, in __call__
return self._callable(ffi.cast("void*", buf_arr), len(buf_arr))
RuntimeError: cannot call null pointer pointer from cdata 'int(*)(void *, int)'
You can also see a simpler stack trace by starting the Python from the OneDir build and trying to import clr:
PS C:\Temp\salt> .\Scripts\python.exe
Python 3.10.11 (heads/main:408ea86, May 5 2023, 02:40:17) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Temp\salt\lib\site-packages\clr.py", line 6, in <module>
load()
File "C:\Temp\salt\lib\site-packages\pythonnet\__init__.py", line 143, in load
if func(b"") != 0:
File "C:\Temp\salt\lib\site-packages\clr_loader\types.py", line 64, in __call__
return self._callable(ffi.cast("void*", buf_arr), len(buf_arr))
RuntimeError: cannot call null pointer pointer from cdata 'int(*)(void *, int)'
The text was updated successfully, but these errors were encountered:
Description
On some machines, PythonNet fails to load. This is presented in Salt by unzipping a Relenv OneDir build and then running
.\salt-call.exe --version
. You will see the following stacktrace:You can also see a simpler stack trace by starting the Python from the OneDir build and trying to
import clr
:The text was updated successfully, but these errors were encountered: