CadQuery / CQ-editor

CadQuery GUI editor based on PyQT
Apache License 2.0
772 stars 119 forks source link

importStep not working on "run" but on "debug" #299

Open kfina91 opened 3 years ago

kfina91 commented 3 years ago

I have a very simple script:

import cadquery as cq
result = cq.importers.importStep('./file.step')
show_object(result, options={"alpha":0.5, "color": (64, 164, 223)})

When I run it via "Run", i get an error: ValueERROR: STEP File could not be loaded image

If I run it via "Debug" and then click "Continue" my file loads fine: image

I am on Windows 10, created a new project in pycharm with a conda environment and installed it via conda install -c cadquery -c conda-forge cq-editor=master (as in README.md) my conda environment looks like this:

alabaster                 0.7.12                     py_0    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
astroid                   2.8.4            py38haa244fe_0    conda-forge
async_generator           1.10                       py_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
autopep8                  1.5.6              pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bcrypt                    3.2.0            py38h294d835_2    conda-forge
black                     21.10b0            pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
brotlipy                  0.7.0           py38h294d835_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
cadquery                  master                    py3.8    cadquery
certifi                   2021.10.8        py38haa244fe_1    conda-forge
cffi                      1.15.0           py38hd8c33c5_0    conda-forge
chardet                   4.0.0            py38haa244fe_2    conda-forge
click                     8.0.3            py38haa244fe_1    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cq-editor                 master                    py3.8    cadquery
cryptography              35.0.0           py38hb7941b4_2    conda-forge
curl                      7.79.1               h789b8ee_1    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
debugpy                   1.5.1            py38h885f38d_0    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
docutils                  0.17.1           py38haa244fe_0    conda-forge
double-conversion         3.1.5                h0e60522_2    conda-forge
eigen                     3.4.0                h2d74725_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
expat                     2.4.1                h39d44d4_0    conda-forge
ezdxf                     0.17             py38hbd9d945_0    conda-forge
ffmpeg                    4.3.1                ha925a31_0    conda-forge
flake8                    3.8.4                      py_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.13.1            h1989441_1005    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freeimage                 3.18.0               hfcb8cd7_7    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
future                    0.18.2           py38haa244fe_4    conda-forge
gl2ps                     1.4.2                h0597ee9_0    conda-forge
glew                      2.1.0                h39d44d4_2    conda-forge
hdf4                      4.2.15               h0e5069d_3    conda-forge
hdf5                      1.10.6          nompi_h5268f04_1114    conda-forge
icu                       68.2                 h0e60522_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
ilmbase                   2.5.5                h12d4b20_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.8.1            py38haa244fe_1    conda-forge
importlib_metadata        4.8.1                hd8ed1ab_1    conda-forge
intel-openmp              2021.4.0          h57928b3_3556    conda-forge
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 6.4.2            py38h595d716_0    conda-forge
ipython                   7.29.0           py38h595d716_1    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     5.10.0             pyhd8ed1ab_0    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.17.2           py38haa244fe_2    conda-forge
jinja2                    3.0.2              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
jsoncpp                   1.9.4                h2d74725_3    conda-forge
jsonschema                4.1.2              pyhd8ed1ab_0    conda-forge
jupyter-client            6.1.12                   pypi_0    pypi
jupyter_client            7.0.6              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1            py38haa244fe_0    conda-forge
jupyterlab                3.2.2                    pypi_0    pypi
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
keyring                   23.2.1           py38haa244fe_0    conda-forge
krb5                      1.19.2               h20d022d_3    conda-forge
lazy-object-proxy         1.6.0            py38h294d835_1    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libblas                   3.9.0                     8_mkl    conda-forge
libcblas                  3.9.0                     8_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libcurl                   7.79.1               h789b8ee_1    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.9.0                     8_mkl    conda-forge
libnetcdf                 4.8.0           nompi_hf689e7d_103    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libraw                    0.20.2               hee1bdec_1    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libspatialindex           1.9.3                h39d44d4_4    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libtheora                 1.1.1             h8d14728_1005    conda-forge
libtiff                   4.3.0                hd413186_2    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libxml2                   2.9.12               hf5bbc77_1    conda-forge
libzip                    1.8.0                hfed4ece_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
logbook                   1.5.3            py38h294d835_4    conda-forge
loguru                    0.5.3            py38haa244fe_3    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
markupsafe                2.0.1            py38h294d835_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py38h294d835_1005    conda-forge
mkl                       2020.4             hb70f87d_311    conda-forge
mypy_extensions           0.4.3            py38haa244fe_4    conda-forge
nbclient                  0.5.4              pyhd8ed1ab_0    conda-forge
nbconvert                 6.2.0            py38haa244fe_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
nlopt                     2.7.0            py38h8e1f723_1    conda-forge
nptyping                  1.4.4              pyhd8ed1ab_0    conda-forge
numpy                     1.21.3           py38h089cfbf_1    conda-forge
numpydoc                  1.1.0                      py_1    conda-forge
occt                      7.5.2                h60997fb_2    conda-forge
ocp                       7.5.2beta               1_py3.8    cadquery
openexr                   2.5.5                hab3b255_0    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandoc                    2.16.1               h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
paramiko                  2.8.0              pyhd8ed1ab_0    conda-forge
parso                     0.7.0              pyh9f0ad1d_0    conda-forge
path                      16.2.0           py38haa244fe_1    conda-forge
path.py                   12.5.0                        0    conda-forge
pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
platformdirs              2.3.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.0.0            py38haa244fe_2    conda-forge
proj                      7.2.0                h1cfcee9_2    conda-forge
prompt-toolkit            3.0.22             pyha770c72_0    conda-forge
psutil                    5.8.0            py38h294d835_2    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pugixml                   1.11.4               h0e60522_0    conda-forge
pycodestyle               2.6.0              pyh9f0ad1d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydocstyle                6.1.1              pyhd8ed1ab_0    conda-forge
pyflakes                  2.2.0              pyh9f0ad1d_0    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pylint                    2.11.1             pyhd8ed1ab_0    conda-forge
pyls-black                0.4.6              pyh9f0ad1d_0    conda-forge
pyls-spyder               0.3.2              pyhd8ed1ab_0    conda-forge
pynacl                    1.4.0            py38h31c79cd_3    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.4              pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py38haa244fe_7    conda-forge
pyqt-impl                 5.12.3           py38h885f38d_7    conda-forge
pyqt5-sip                 4.19.18          py38h885f38d_7    conda-forge
pyqtchart                 5.12             py38h885f38d_7    conda-forge
pyqtgraph                 0.12.3             pyhd8ed1ab_0    conda-forge
pyqtwebengine             5.12.1           py38h885f38d_7    conda-forge
pyrsistent                0.18.0           py38h294d835_0    conda-forge
pysocks                   1.7.1            py38haa244fe_4    conda-forge
python                    3.8.12          h7840368_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-jsonrpc-server     0.4.0              pyh9f0ad1d_0    conda-forge
python-language-server    0.36.2             pyhd8ed1ab_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   301              py38h294d835_0    conda-forge
pywin32-ctypes            0.2.0           py38haa244fe_1004    conda-forge
pyyaml                    6.0              py38h294d835_2    conda-forge
pyzmq                     22.3.0           py38h09162b1_1    conda-forge
qdarkstyle                3.0.2              pyhd8ed1ab_0    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
qtawesome                 1.1.0              pyhd8ed1ab_0    conda-forge
qtconsole                 5.1.1              pyhd8ed1ab_0    conda-forge
qtpy                      1.11.2             pyhd8ed1ab_0    conda-forge
rapidjson                 1.1.0             ha925a31_1002    conda-forge
regex                     2021.11.2        py38h294d835_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
rope                      0.21.0             pyhd8ed1ab_0    conda-forge
rtree                     0.9.7            py38h8b54edf_2    conda-forge
setuptools                58.5.3           py38haa244fe_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.2.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
spyder                    4.2.1            py38haa244fe_3    conda-forge
spyder-kernels            1.10.2           py38haa244fe_0    conda-forge
sqlite                    3.36.0               h8ffe710_2    conda-forge
tbb                       2020.2               h2d74725_4    conda-forge
tbb-devel                 2020.2               h2d74725_4    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
textdistance              4.2.2              pyhd8ed1ab_0    conda-forge
three-merge               0.1.1              pyh9f0ad1d_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     1.2.2              pyhd8ed1ab_0    conda-forge
tornado                   6.1              py38h294d835_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typed-ast                 1.4.3            py38h294d835_1    conda-forge
typing-extensions         3.10.0.2             hd8ed1ab_0    conda-forge
typing_extensions         3.10.0.2           pyha770c72_0    conda-forge
typish                    1.9.3              pyhd8ed1ab_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
ujson                     4.2.0            py38h885f38d_1    conda-forge
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
utfcpp                    3.2.1                h57928b3_0    conda-forge
vc                        14.2                 hb210afc_5    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
vtk                       9.0.1           no_osmesa_py38h8c3c96c_109    conda-forge
watchdog                  2.1.6            py38haa244fe_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
win32_setctime            1.0.3                      py_0    conda-forge
win_inet_pton             1.1.0            py38haa244fe_3    conda-forge
wrapt                     1.12.1           py38h294d835_3    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
yapf                      0.31.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.6.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge
adam-urbanczyk commented 2 years ago

Save the file first or do not use Change working dir to script dir option (Preferences -> Debugger).