1

When I import clr I get an error.

Environment

  • pythonnet version: 3.0.1
  • Python version: Python 3.9.7

Import clr.

import clr

I get an error. I would like to know how it works properly.

C:\Users\user\pythonnetProject\venv\Scripts\python.exe C:/Users/user/pythonnetProject/main.py
Traceback (most recent call last):
  File "C:\Users\user\pythonnetProject\main.py", line 3, in <module>
    import clr
  File "C:\Users\user\pythonnetProject\venv\lib\site-packages\clr.py", line 6, in <module>
    load()
  File "C:\Users\user\pythonnetProject\venv\lib\site-packages\pythonnet\__init__.py", line 143, in load
    if func(b"") != 0:
  File "C:\Users\user\pythonnetProject\venv\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)'

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.