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.

Crashing execution

See original GitHub issue

Description

What steps will reproduce the problem?

What happens for my program when i ran my program in

Traceback

Exception in comms call get_namespace_view:
  File "C:\Program Files\Spyder\pkgs\spyder_kernels\comms\commbase.py", line 315, in _comm_message
    encoding='latin-1')
ModuleNotFoundError: No module named 'torch'

Versions

  • Spyder version: 4.2.1
  • Python version: 3.7.9
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0            :  1.4.0 (OK)
chardet >=2.0.0                 :  4.0.0 (OK)
cloudpickle >=0.5.0             :  1.6.0 (OK)
diff_match_patch >=20181111     :  20200713 (OK)
intervaltree                    :  None (OK)
IPython >=7.6.0                 :  7.19.0 (OK)
jedi =0.17.2                    :  0.17.2 (OK)
jsonschema >=3.2.0              :  3.2.0 (OK)
keyring >=17.0.0                :  21.5.0 (OK)
nbconvert >=4.0                 :  6.0.7 (OK)
numpydoc >=0.6.0                :  1.1.0 (OK)
paramiko >=2.4.0                :  2.7.2 (OK)
parso =0.7.0                    :  0.7.0 (OK)
pexpect >=4.4.0                 :  4.8.0 (OK)
pickleshare >=0.4               :  0.7.5 (OK)
psutil >=5.3                    :  5.7.3 (OK)
pygments >=2.0                  :  2.7.3 (OK)
pylint >=1.0                    :  2.6.0 (OK)
pyls >=0.36.2;<1.0.0            :  0.36.2 (OK)
pyls_black >=0.4.6              :  0.4.6 (OK)
pyls_spyder >=0.3.0             :  0.3.0 (OK)
qdarkstyle >=2.8                :  2.8.1 (OK)
qtawesome >=0.5.7               :  1.0.2 (OK)
qtconsole >=5.0.1               :  5.0.1 (OK)
qtpy >=1.5.0                    :  1.9.0 (OK)
rtree >=0.8.3                   :  0.9.4 (OK)
setuptools >=39.0.0             :  51.0.0 (OK)
sphinx >=0.6.6                  :  3.3.1 (OK)
spyder_kernels >=1.10.1;<1.11.0 :  1.10.1 (OK)
textdistance >=4.2.0            :  4.2.0 (OK)
three_merge >=0.1.1             :  0.1.1 (OK)
watchdog                        :  1.0.2 (OK)
zmq >=17                        :  20.0.0 (OK)

# Optional:
cython >=0.21                   :  0.29.21 (OK)
matplotlib >=2.0.0              :  3.3.3 (OK)
numpy >=1.7                     :  1.19.3 (OK)
pandas >=1.1.1                  :  1.1.5 (OK)
scipy >=0.17.0                  :  1.5.4 (OK)
sympy >=0.7.3                   :  1.7.1 (OK)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ccordoba12commented, May 30, 2021

I can add to this that installing spyder on exactly the same environment where PyTorch was and running Spyder on that environment solves this issue for me. Now I can explore all variables including PyTorch objects and numpy arrays.

Yeah, that’s really the only possible solution right now. Closing then.

0reactions
neurosockcommented, May 28, 2021

Hi @ccordoba12, all the variables (even simple numpy arrays) were gone after the error in my case, so the Variable Explorer was fully empty.

I can add to this that installing spyder on exactly the same environment where PyTorch was and running Spyder on that environment solves this issue for me. Now I can explore all variables including PyTorch objects and numpy arrays.

I think this can be related to: #15683 and #15522

My environment now

# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
argh                      0.26.2          pyh9f0ad1d_1002    conda-forge
arrow                     1.1.0              pyhd8ed1ab_1    conda-forge
astroid                   2.5.6            py39hcbf5309_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.5              pyh44b312d_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyhd3eb1b0_0
bcrypt                    3.2.0            py39hb82d6ee_1    conda-forge
binaryornot               0.4.4                      py_1    conda-forge
black                     21.5b1             pyhd8ed1ab_0    conda-forge
blas                      1.0                         mkl
bleach                    3.3.0              pyh44b312d_0    conda-forge
brotlipy                  0.7.0           py39hb82d6ee_1001    conda-forge
ca-certificates           2020.12.5            h5b45459_0    conda-forge
certifi                   2020.12.5        py39hcbf5309_1    conda-forge
cffi                      1.14.5           py39h0878f49_0    conda-forge
chardet                   4.0.0            py39hcbf5309_1    conda-forge
click                     8.0.1            py39hcbf5309_0    conda-forge
cloudpickle               1.6.0                      py_0
colorama                  0.4.4              pyhd3eb1b0_0
cookiecutter              1.7.3              pyh6c4a22f_0    conda-forge
cryptography              3.4.7            py39hd8d06c1_0    conda-forge
cudatoolkit               10.2.89              h74a9793_1
cycler                    0.10.0           py39haa95532_0
dataclasses               0.8                pyhc8e2a94_1    conda-forge
decorator                 5.0.9              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
docutils                  0.17.1           py39hcbf5309_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
ffmpeg                    4.3.1                ha925a31_0    conda-forge
flake8                    3.8.4                      py_0    conda-forge
freetype                  2.10.4               hd328e21_0
future                    0.18.2           py39hcbf5309_3    conda-forge
gym                       0.18.0           py39h832f523_1    conda-forge
icc_rt                    2019.0.0             h0cc432a_1
icu                       58.2                 ha925a31_3
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.3.0            py39hcbf5309_0    conda-forge
importlib_metadata        4.3.0                hd8ed1ab_0    conda-forge
inflection                0.5.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2021.2.0           haa95532_616
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 5.3.4            py39h7b7c402_0
ipython                   7.22.0           py39hd4e2768_0
ipython_genutils          0.2.0              pyhd3eb1b0_1
isort                     5.8.0              pyhd8ed1ab_0    conda-forge
jedi                      0.17.2           py39haa95532_1
jinja2                    2.11.3             pyh44b312d_0    conda-forge
jinja2-time               0.2.0                      py_2    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9b                   hb83a4c4_2
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter_client            6.1.12             pyhd3eb1b0_0
jupyter_core              4.7.1            py39haa95532_0
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
keyring                   23.0.1           py39hcbf5309_0    conda-forge
kiwisolver                1.3.1            py39hd77b12b_0
lazy-object-proxy         1.6.0            py39hb82d6ee_0    conda-forge
libblas                   3.9.0           1_h8933c1f_netlib    conda-forge
libcblas                  3.9.0           5_hd5c7e75_netlib    conda-forge
libpng                    1.6.37               h2a8f88b_0
libsodium                 1.0.18               h62dcd97_0
libspatialindex           1.9.3                h39d44d4_3    conda-forge
libtiff                   4.2.0                hd0e1b90_0
libuv                     1.40.0               he774522_0
lz4-c                     1.9.3                h2bbff1b_0
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                1.1.1            py39hb82d6ee_3    conda-forge
matplotlib                3.3.4            py39haa95532_0
matplotlib-base           3.3.4            py39h49ac443_0
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py39hb82d6ee_1003    conda-forge
mkl                       2021.2.0           haa95532_296
mkl-service               2.3.0            py39h2bbff1b_1
mkl_fft                   1.3.0            py39h277e83a_2
mkl_random                1.2.1            py39hf11a4ad_2
msys2-conda-epoch         20160418                      1    conda-forge
mypy_extensions           0.4.3            py39hcbf5309_3    conda-forge
nbclient                  0.5.3              pyhd8ed1ab_0    conda-forge
nbconvert                 6.0.7            py39hcbf5309_3    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
neurogym                  0.0.1                     dev_0    <develop>
ninja                     1.10.2               h6d14046_1
numpy                     1.20.2           py39ha4e8547_0
numpy-base                1.20.2           py39hc2deb75_0
numpydoc                  1.1.0                      py_1    conda-forge
olefile                   0.46                       py_0
openssl                   1.1.1k               h8ffe710_0    conda-forge
packaging                 20.9               pyh44b312d_0    conda-forge
pandoc                    2.13                 h8ffe710_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
paramiko                  2.7.2              pyh9f0ad1d_0    conda-forge
parso                     0.7.0                      py_0
pathspec                  0.8.1              pyhd3deb0d_0    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    8.2.0            py39h4fa10fc_0
pip                       21.1.1           py39haa95532_0
pluggy                    0.13.1           py39hcbf5309_4    conda-forge
poyo                      0.5.0                      py_0    conda-forge
prompt-toolkit            3.0.17             pyh06a4308_0
psutil                    5.8.0            py39hb82d6ee_1    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_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
pyglet                    1.5.16           py39hcbf5309_0    conda-forge
pygments                  2.9.0              pyhd3eb1b0_0
pylint                    2.7.2            py39hcbf5309_0    conda-forge
pyls-black                0.4.6              pyh9f0ad1d_0    conda-forge
pyls-spyder               0.3.2              pyhd3eb1b0_0
pynacl                    1.4.0            py39hb3671d1_2    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyhd3eb1b0_0
pyqt                      5.9.2            py39hd77b12b_6
pyrsistent                0.17.3           py39hb82d6ee_2    conda-forge
pysocks                   1.7.1            py39hcbf5309_3    conda-forge
python                    3.9.5                h6244533_3
python-dateutil           2.8.1              pyhd3eb1b0_0
python-jsonrpc-server     0.4.0              pyh9f0ad1d_0    conda-forge
python-language-server    0.36.2             pyhd8ed1ab_0    conda-forge
python-slugify            5.0.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      1_cp39    conda-forge
pytorch                   1.8.1           py3.9_cuda10.2_cudnn7_0    pytorch
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pywin32                   228              py39he774522_0
pywin32-ctypes            0.2.0           py39hcbf5309_1003    conda-forge
pyyaml                    5.4.1            py39hb82d6ee_0    conda-forge
pyzmq                     20.0.0           py39hd77b12b_1
qdarkstyle                3.0.2              pyhd8ed1ab_0    conda-forge
qstylizer                 0.2.0              pyhd8ed1ab_1    conda-forge
qt                        5.9.7            vc14h73c81de_0
qtawesome                 1.0.2              pyhd8ed1ab_0    conda-forge
qtconsole                 5.1.0              pyhd8ed1ab_0    conda-forge
qtpy                      1.9.0                      py_0    conda-forge
regex                     2021.4.4         py39hb82d6ee_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
rope                      0.18.0             pyhd3deb0d_0    conda-forge
rtree                     0.9.7            py39h09fdee3_1    conda-forge
scikit-learn              0.24.2           py39he931e04_0    conda-forge
scipy                     1.6.2            py39h66253e8_1
setuptools                52.0.0           py39haa95532_0
sip                       4.19.13          py39hd77b12b_0
six                       1.15.0           py39haa95532_0
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.0.2              pyh6c4a22f_1    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                    5.0.0            py39haa95532_1
spyder-kernels            2.0.1            py39haa95532_0
sqlite                    3.35.4               h2bbff1b_0
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
text-unidecode            1.3                        py_0    conda-forge
textdistance              4.2.1              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
three-merge               0.1.1              pyh9f0ad1d_0    conda-forge
tinycss2                  1.1.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.10               he774522_0
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39h2bbff1b_0
traitlets                 5.0.5              pyhd3eb1b0_0
typed-ast                 1.4.3            py39hb82d6ee_0    conda-forge
typing_extensions         3.7.4.3            pyha847dfd_0
tzdata                    2020f                h52ac0ba_0
ujson                     4.0.2            py39h415ef7b_0    conda-forge
unidecode                 1.2.0              pyhd8ed1ab_0    conda-forge
urllib3                   1.26.5             pyhd8ed1ab_0    conda-forge
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
watchdog                  1.0.2            py39hcbf5309_1    conda-forge
wcwidth                   0.2.5                      py_0
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.36.2             pyhd3eb1b0_0
win_inet_pton             1.1.0            py39hcbf5309_2    conda-forge
wincertstore              0.2              py39h2bbff1b_0
wrapt                     1.12.1           py39hb82d6ee_3    conda-forge
xz                        5.2.5                h62dcd97_0
yaml                      0.2.5                he774522_0    conda-forge
yapf                      0.31.0             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.3                ha925a31_3
zipp                      3.4.1              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11               h62dcd97_4
zstd                      1.4.5                h04227a9_0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Project Crashing in Project Management: Definition & Best ...
Making a project crashing budget is the next step in executing your project crashing plan. You'll have to update your baseline, schedule and ......
Read more >
Why is my add-in crashing? - Microsoft Support
Word experienced a serious problem with the 'dep exception on startup add-in' add-in. This add-in is incompatible with Data Execution Prevention mode and...
Read more >
Crash (computing) - Wikipedia
In computing, a crash, or system crash, occurs when a computer program such as a software ... crashes are exploitable and let a...
Read more >
Crashes - Android Developers
An app that is written using machine code or C++ crashes if there's an unhandled signal, such as SIGSEGV , during its execution....
Read more >
Understanding the exception types in a crash report
Learn what the exception type tells you about why your app crashed. ... debugger the chance to interrupt the process at a specific...
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