question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to import crl with python 3.10 - 32bit

See original GitHub issue

Environment

Pythonnet Version: Requirement already satisfied: pythonnet in c:\users\hossa\appdata\local\programs\python\python310-32\lib\site-packages\pythonnet-3.0.0.dev1-py3.10.egg (3.0.0.dev1) Requirement already satisfied: clr_loader in c:\users\hossa\appdata\local\programs\python\python310-32\lib\site-packages\clr_loader-0.1.6-py3.10.egg (from pythonnet) (0.1.6) Requirement already satisfied: cffi>=1.13 in c:\users\hossa\appdata\local\programs\python\python310-32\lib\site-packages (from clr_loader->pythonnet) (1.15.0) Requirement already satisfied: pycparser in c:\users\hossa\appdata\local\programs\python\python310-32\lib\site-packages (from cffi>=1.13->clr_loader->pythonnet) (2.21)

  • Python version:3.10.0
  • Operating System: windows 10
  • .NET Runtime:

v2.0.50727 2.0.50727.4927 v3.0 3.0.30729.4926 Windows Communication Foundation 3.0.4506.4926 Windows Presentation Foundation 3.0.6920.4902 v3.5 3.5.30729.4926 Client 4.8.04084 Full 4.8.04084 Client 4.0.0.0

Details

import clr gives the following error:

Traceback (most recent call last):
  File "C:\Users\hossa\git\Research\Riz\clrstuff.py", line 1, in <module>
    import clr
  File "C:\Users\hossa\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pythonnet-3.0.0.dev1-py3.10.egg\clr.py", line 6, in <module>
    load()
  File "C:\Users\hossa\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pythonnet-3.0.0.dev1-py3.10.egg\pythonnet\__init__.py", line 43, in load
    if func(''.encode("utf8")) != 0:
  File "C:\Users\hossa\AppData\Local\Programs\Python\Python310-32\lib\site-packages\clr_loader-0.1.6-py3.10.egg\clr_loader\wrappers.py", line 20, in __call__
    return self._callable(ffi.cast("void*", buf_arr), len(buf_arr))
RuntimeError: cannot call null pointer pointer from cdata 'int(*)(void *, int)'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
daogeworkcommented, May 30, 2023

I faced this problem in venv,without venv no problem,and nothing to do with py310 or py311

1reaction
Josef-Hauptcommented, May 24, 2023

I also get the same error after building with pyinstaller: clr-loader 0.2.5 pythonnet 3.0.1 python 3.10.10

I have no idea what the problem is, since it works on my win11 machine, but won’t on another and I did not install any additional .NET dependencies.

Is there a workaround? Or do you need more info? I see this issue is closed, but seems to be an ongoing problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog — Python 3.11.4 documentation
spawn from failing to import in environments where sys.executable is None . This regressed in 3.11 with the addition of support for path-like...
Read more >
How to fix error during pythonnet installation
whl (for 64-bit python version). Then specify a full path to wheel file for installation. Example: pip install C:\Users\User\Downloads\pythonnet ...
Read more >
Packages included in Anaconda 2022.10 for 32-bit ...
Name Version Summary / License _libgcc_mutex 0.1 Mutex for libgcc and libgcc‑ng / None aiofiles 0.7.0 File support for asyncio / Apache 2.0 alembic 1.7.5 A...
Read more >
About MariaDB Connector/ODBC
MariaDB Connector/ODBC is a database driver that uses the industry standard Open Database Connectivity (ODBC) API. Some of the key features of the...
Read more >
pythonnet
Python.NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found