Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable explorer unable to open certain variables #22396

Open
stephen-segal opened this issue Aug 29, 2024 · 3 comments
Open

Variable explorer unable to open certain variables #22396

stephen-segal opened this issue Aug 29, 2024 · 3 comments

Comments

@stephen-segal
Copy link

Description

What steps will reproduce the problem?

Certain variables that appear in the variable explorer can't be opened in pop-out windows. This appears to include Pandas dataframes and any Numpy arrays or variables (including tuples that contain Numpy scalars).
Error message popup is: "Spyder was unable to retrieve the value of this variable from the console. The error message was: 'An unknown error occurred. Check the console because its contents could have been printed there. Note: Please don't report this problem on Github, there's nothing to do about it."
Issue appeared upon upgrade to newest version of Spyder. It was not present previously.

Versions

  • Spyder version: 5.5.6 (standalone)
  • Python version: 3.8.10 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.11
  • Operating System: Windows-10-10.0.22621-SP0

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.1 (OK)
chardet >=2.0.0               :  5.2.0 (OK)
cloudpickle >=0.5.0           :  3.0.0 (OK)
cookiecutter >=1.6.0          :  2.6.0 (OK)
diff_match_patch >=20181111   :  20230430 (OK)
importlib_metadata >=4.6.0    :  8.4.0 (OK)
intervaltree                  :  None (OK)
IPython >=8.12.2,<8.13.0      :  8.12.3 (OK)
jedi >=0.17.2,<0.20.0         :  0.19.1 (OK)
jellyfish >=0.7               :  1.1.0 (OK)
jsonschema >=3.2.0            :  4.23.0 (OK)
keyring >=17.0.0              :  25.3.0 (OK)
nbconvert >=4.0               :  7.16.4 (OK)
numpydoc >=0.6.0              :  1.7.0 (OK)
paramiko >=2.4.0              :  3.4.1 (OK)
parso >=0.7.0,<0.9.0          :  0.8.4 (OK)
pexpect >=4.4.0               :  4.9.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  6.0.0 (OK)
pygments >=2.0                :  2.18.0 (OK)
pylint >=3.1,<4               :  3.2.6 (OK)
pylint_venv >=3.0.2           :  3.0.3 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.12.0,<1.13.0        :  1.12.0 (OK)
pylsp_black >=2.0.0,<3.0.0    :  2.0.0 (OK)
qdarkstyle >=3.2.0,<3.3.0     :  3.2.3 (OK)
qstylizer >=0.2.2             :  0.2.3 (OK)
qtawesome >=1.3.1,<1.4.0      :  1.3.1 (OK)
qtconsole >=5.5.1,<5.6.0      :  5.5.2 (OK)
qtpy >=2.1.0                  :  2.4.1 (OK)
rtree >=0.9.7                 :  1.3.0 (OK)
setuptools >=49.6.0           :  73.0.1 (OK)
sphinx >=0.6.6                :  7.1.2 (OK)
spyder_kernels >=2.5.2,<2.6.0 :  2.5.2 (OK)
textdistance >=4.2.0          :  4.6.2 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog                      :  4.0.2 (OK)
zmq >=24.0.0                  :  26.2.0 (OK)

# Optional:
cython >=0.21                 :  3.0.11 (OK)
matplotlib >=3.0.0            :  3.7.5 (OK)
numpy >=1.7                   :  1.24.4 (OK)
pandas >=1.1.1                :  2.0.3 (OK)
scipy >=0.17.0                :  1.10.1 (OK)
sympy >=0.7.3                 :  1.13.2 (OK)

Environment

Environment
Package                       Version
----------------------------- --------------
alabaster                     0.7.13
annotated-types               0.7.0
arrow                         1.3.0
astroid                       3.2.4
asttokens                     2.4.1
atomicwrites                  1.4.1
attrs                         24.2.0
autopep8                      2.0.4
babel                         2.16.0
backcall                      0.2.0
backports.tarfile             1.2.0
bcrypt                        4.2.0
beautifulsoup4                4.12.3
binaryornot                   0.4.4
black                         24.8.0
bleach                        6.1.0
certifi                       2024.7.4
cffi                          1.17.0
chardet                       5.2.0
charset-normalizer            3.3.2
click                         8.1.7
cloudpickle                   3.0.0
colorama                      0.4.6
comm                          0.2.2
contourpy                     1.1.1
cookiecutter                  2.6.0
cryptography                  43.0.0
cycler                        0.12.1
Cython                        3.0.11
debugpy                       1.8.5
decorator                     5.1.1
defusedxml                    0.7.1
diff-match-patch              20230430
dill                          0.3.8
distlib                       0.3.8
docstring-to-markdown         0.15
docutils                      0.20.1
et-xmlfile                    1.1.0
executing                     2.0.1
fastjsonschema                2.20.0
filelock                      3.15.4
flake8                        7.1.1
fonttools                     4.53.1
idna                          3.8
imagesize                     1.4.1
importlib_metadata            8.4.0
importlib_resources           6.4.4
inflection                    0.5.1
intervaltree                  3.1.0
ipykernel                     6.29.5
ipython                       8.12.3
isort                         5.13.2
jaraco.classes                3.4.0
jaraco.context                6.0.1
jaraco.functools              4.0.2
jedi                          0.19.1
jellyfish                     1.1.0
Jinja2                        3.1.4
jsonschema                    4.23.0
jsonschema-specifications     2023.12.1
jupyter_client                8.6.2
jupyter_core                  5.7.2
jupyterlab_pygments           0.3.0
keyring                       25.3.0
kiwisolver                    1.4.5
markdown-it-py                3.0.0
MarkupSafe                    2.1.5
matplotlib                    3.7.5
matplotlib-inline             0.1.7
mccabe                        0.7.0
mdurl                         0.1.2
mistune                       3.0.2
more-itertools                10.4.0
mpmath                        1.3.0
mypy-extensions               1.0.0
nbclient                      0.10.0
nbconvert                     7.16.4
nbformat                      5.10.4
nest-asyncio                  1.6.0
numpy                         1.24.4
numpydoc                      1.7.0
openpyxl                      3.1.5
packaging                     24.1
pandas                        2.0.3
pandocfilters                 1.5.1
paramiko                      3.4.1
parso                         0.8.4
pathspec                      0.12.1
pexpect                       4.9.0
pickleshare                   0.7.5
pillow                        10.4.0
pip                           24.2
pkgutil_resolve_name          1.3.10
platformdirs                  4.2.2
pluggy                        1.5.0
prompt_toolkit                3.0.47
psutil                        6.0.0
ptyprocess                    0.7.0
pure_eval                     0.2.3
pycodestyle                   2.12.1
pycparser                     2.22
pydantic                      2.6.4
pydantic_core                 2.16.3
pydocstyle                    6.3.0
pyflakes                      3.2.0
Pygments                      2.18.0
pylint                        3.2.6
pylint-venv                   3.0.3
pyls-spyder                   0.4.0
PyNaCl                        1.5.0
pyparsing                     3.1.4
pypcd                         0.1.1
pypcd4                        1.0.1
PyQt5                         5.15.11
PyQt5-Qt5                     5.15.2
PyQt5_sip                     12.15.0
PyQtWebEngine                 5.15.7
PyQtWebEngine-Qt5             5.15.2
python-dateutil               2.9.0.post0
python-lsp-black              2.0.0
python-lsp-jsonrpc            1.1.2
python-lsp-server             1.12.0
python-lzf                    0.2.6
python-slugify                8.0.4
pytoolconfig                  1.3.1
pytz                          2024.1
pywin32                       306
pywin32-ctypes                0.2.3
pyxdg                         0.28
PyYAML                        6.0.2
pyzmq                         26.2.0
QDarkStyle                    3.2.3
qstylizer                     0.2.3
QtAwesome                     1.3.1
qtconsole                     5.5.2
QtPy                          2.4.1
referencing                   0.35.1
requests                      2.32.3
rich                          13.8.0
rope                          1.13.0
rpds-py                       0.20.0
Rtree                         1.3.0
scipy                         1.10.1
setuptools                    73.0.1
six                           1.16.0
snowballstemmer               2.2.0
sortedcontainers              2.4.0
soupsieve                     2.6
Sphinx                        7.1.2
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
spyder                        5.5.6
spyder-kernels                2.5.2
stack-data                    0.6.3
sympy                         1.13.2
tabulate                      0.9.0
text-unidecode                1.3
textdistance                  4.6.3
three-merge                   0.1.1
tinycss2                      1.3.0
tomli                         2.0.1
tomlkit                       0.13.2
tornado                       6.4.1
traitlets                     5.14.3
types-python-dateutil         2.9.0.20240821
typing_extensions             4.12.2
tzdata                        2024.1
ujson                         5.10.0
urllib3                       2.2.2
virtualenv                    20.26.3
watchdog                      4.0.2
wcwidth                       0.2.13
webencodings                  0.5.1
whatthepatch                  1.0.6
wheel                         0.44.0
yapf                          0.40.2
zipp                          3.20.1

@stephen-segal
Copy link
Author

The automatically-generated bug report pasted above has a mistake. My system's default Python version is 3.8, but I'm using a virtual environment at 3.12.5 that I've pointed Spyder to in the preferences. Similarly, the dependencies listed above are not what I've got installed in my virtual environment.

@stephen-segal
Copy link
Author

Additional update -- I should have said that this error appeared in an upgrade to 5.5.6 using the standalone installer. I've deleted that standalone version and went back to installing in pip directly to my virtual environment. Problem is gone. So I'd say this is a problem when attempting to use the standalone along with a pip-maintained virtual environment. No problem at all if I just stay in pip and avoid the standalone.

@dalthviz
Copy link
Member

Hi @stephen-segal thank you for the report and the extra info regarding the steps you followed to workaround the problem! I would say that most probably there is an incompatibility between the numpy version the installer comes with (numpy 1.24.4) and the version you are using/have installed over your Python 3.12 virtual enviroment (maybe is numpy 2.x by any chance)? Probably a similar incompatibility is happening with pandas too. Also, indeed a way to workaround that limitation from the installer is to simply install Spyder over the env you want to use as you did 👍

Some other issue where this has been discussed: #20671 #15998

Let us know if the info above helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants