cadquery
cadquery copied to clipboard
Importing Cadquery causes error exit codes
To Reproduce
import cadquery
pass
Doing this causes the system to finish with exit code (0xC0000005) or exit code (0xc0000374). Version 2.3.1 and 2.4.0 respectively.
Environment
OS: Windows 10 CadQuery was installed with pip in an empty venv running python 3.11.9
On my side, there is no problem. The OS:
Windows 11 professional 23H2 22631.3447
The Python distribution:
Anaconda3-2023.09-0-Windows-x86_64.exe Python 3.11.5
The Python venv is:
(cqvenv) (base) D:>python Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] on win32
The CadQuery version: (cqvenv) (base) D:>python Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] on win32
import cadquery print(cadquery.version) 2.4.0
To reproduce, a test.py file is created, and its content is as following:
import cadquery pass
@jdegenstein Could this be related to the cadquery-ocp issue that you pinged me about?
https://github.com/CadQuery/ocp-build-system/pull/26
While not directly related to the above issue, I ran into a similar problem when using pytest on cadquery 5429f618c6723b47f07ba5394a912e22b0dd5cff on Windows 10 on Python 3.10 with pytest.
platform win32 -- Python 3.10.9, pytest-8.2.2, pluggy-1.5.0
rootdir: C:\Users\Alex\<redacted>
configfile: pyproject.toml
plugins: repeat-0.9.3, rerunfailures-14.0
collected 13 items
tests\test_cad.py ............. [100%]
==================================== 13 passed in 29.51s ====================================
Windows fatal exception: access violation
Current thread 0x00002504 (most recent call first):
<no Python frame>
Note that a similar script without pytest would work just fine.
Solution was to disable pytest's faulthandler with:
pytest -p no:faulthandler
Hopefully someone else finds this helpful. Note that this issue does not occur on cadquery==v2.4.0.
Thanks @akaszynski , could you paste what is in your env (e.g. conda list or similar)?