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

"Spyder Has encoutered an internal problem" when trying to open a panda dataframe from the Variable explorer #20918

Closed
dramajohns opened this issue May 12, 2023 · 3 comments

Comments

@dramajohns
Copy link

Description

What steps will reproduce the problem?

opening a panda dataframe for the variable explorer

Traceback

Traceback (most recent call last):
  File "C:\Users\fedib\anaconda3\envs\spyder\Lib\site-packages\spyder\plugins\variableexplorer\widgets\collectionsdelegate.py", line 211, in createEditor
    if not editor.setup_and_check(value, title=key):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\fedib\anaconda3\envs\spyder\Lib\site-packages\spyder\plugins\variableexplorer\widgets\dataframeeditor.py", line 957, in setup_and_check
    self.dataModel = DataFrameModel(data, parent=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\fedib\anaconda3\envs\spyder\Lib\site-packages\spyder\plugins\variableexplorer\widgets\dataframeeditor.py", line 135, in __init__
    self.max_min_col_update()
  File "C:\Users\fedib\anaconda3\envs\spyder\Lib\site-packages\spyder\plugins\variableexplorer\widgets\dataframeeditor.py", line 244, in max_min_col_update
    for __, col in self.df.iteritems():
                   ^^^^^^^^^^^^^^^^^
  File "C:\Users\fedib\anaconda3\envs\spyder\Lib\site-packages\pandas\core\generic.py", line 5989, in __getattr__
    return object.__getattribute__(self, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DataFrame' object has no attribute 'iteritems'. Did you mean: 'isetitem'?

Versions

  • Spyder version: 5.4.1 (conda)
  • Python version: 3.11.3 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.7
  • 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           :  2.2.1 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<9.0.0       :  8.12.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.17.3 (OK)
keyring >=17.0.0              :  23.13.1 (OK)
nbconvert >=4.0               :  6.5.4 (OK)
numpydoc >=0.6.0              :  1.5.0 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.15.1 (OK)
pylint >=2.5.0;<3.0           :  2.16.2 (OK)
pylint_venv >=2.1.1           :  2.3.0 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.7.0;<1.8.0          :  1.7.2 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.2 (OK)
qstylizer >=0.2.2             :  0.2.2 (OK)
qtawesome >=1.2.1             :  1.2.2 (OK)
qtconsole >=5.4.0;<5.5.0      :  5.4.2 (OK)
qtpy >=2.1.0                  :  2.2.0 (OK)
rtree >=0.9.7                 :  1.0.1 (OK)
setuptools >=49.6.0           :  66.0.0 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.4.1;<2.5.0 :  2.4.3 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=22.1.0                  :  25.0.2 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  3.7.1 (OK)
numpy >=1.7                   :  1.24.3 (OK)
pandas >=1.1.1                :  2.0.1 (OK)
scipy >=0.17.0                :  1.10.1 (OK)
sympy >=0.7.3                 :  None (NOK)

Environment

Environment
# packages in environment at C:\Users\fedib\anaconda3\envs\spyder:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12             pyhd3eb1b0_0  
appdirs                   1.4.4              pyhd3eb1b0_0  
arrow                     1.2.3           py311haa95532_1  
astroid                   2.14.2          py311haa95532_0  
asttokens                 2.0.5              pyhd3eb1b0_0  
atomicwrites              1.4.0                      py_0  
attrs                     22.1.0          py311haa95532_0  
autopep8                  1.6.0              pyhd3eb1b0_1  
babel                     2.11.0          py311haa95532_0  
backcall                  0.2.0              pyhd3eb1b0_0  
bcrypt                    3.2.0           py311h2bbff1b_1  
beautifulsoup4            4.12.2          py311haa95532_0  
binaryornot               0.4.4              pyhd3eb1b0_1  
black                     23.3.0          py311haa95532_0  
blas                      1.0                         mkl  
bleach                    4.1.0              pyhd3eb1b0_0  
brotli                    1.0.9                h2bbff1b_7  
brotli-bin                1.0.9                h2bbff1b_7  
brotlipy                  0.7.0           py311h2bbff1b_1002  
bzip2                     1.0.8                he774522_0  
ca-certificates           2023.01.10           haa95532_0  
cachecontrol              0.12.11                  pypi_0    pypi
cachetools                5.3.0                    pypi_0    pypi
certifi                   2023.5.7        py311haa95532_0  
cffi                      1.15.1          py311h2bbff1b_3  
chardet                   4.0.0           py311haa95532_1003  
charset-normalizer        2.0.4              pyhd3eb1b0_0  
click                     8.0.4           py311haa95532_0  
cloudpickle               2.2.1           py311haa95532_0  
colorama                  0.4.6           py311haa95532_0  
comm                      0.1.2           py311haa95532_0  
console_shortcut          0.1.1                         4  
contourpy                 1.0.5           py311h59b6b97_0  
cookiecutter              1.7.3              pyhd3eb1b0_0  
cryptography              39.0.1          py311h21b164f_0  
cycler                    0.11.0             pyhd3eb1b0_0  
debugpy                   1.5.1           py311hd77b12b_0  
decorator                 5.1.1              pyhd3eb1b0_0  
defusedxml                0.7.1              pyhd3eb1b0_0  
diff-match-patch          20200713           pyhd3eb1b0_0  
dill                      0.3.6           py311haa95532_0  
docstring-to-markdown     0.11            py311haa95532_0  
docutils                  0.18.1          py311haa95532_3  
entrypoints               0.4             py311haa95532_0  
executing                 0.8.3              pyhd3eb1b0_0  
firebase-admin            6.1.0                    pypi_0    pypi
flake8                    6.0.0           py311haa95532_0  
fonttools                 4.25.0             pyhd3eb1b0_0  
freetype                  2.12.1               ha860e81_0  
giflib                    5.2.1                h8cc25b3_3  
glib                      2.69.1               h5dc1a3c_2  
google-api-core           2.11.0                   pypi_0    pypi
google-api-python-client  2.86.0                   pypi_0    pypi
google-auth               2.18.0                   pypi_0    pypi
google-auth-httplib2      0.1.0                    pypi_0    pypi
google-cloud-core         2.3.2                    pypi_0    pypi
google-cloud-firestore    2.11.1                   pypi_0    pypi
google-cloud-storage      2.9.0                    pypi_0    pypi
google-crc32c             1.5.0                    pypi_0    pypi
google-resumable-media    2.5.0                    pypi_0    pypi
googleapis-common-protos  1.59.0                   pypi_0    pypi
grpcio                    1.54.0                   pypi_0    pypi
grpcio-status             1.54.0                   pypi_0    pypi
gst-plugins-base          1.18.5               h9e645db_0  
gstreamer                 1.18.5               hd78058f_0  
httplib2                  0.22.0                   pypi_0    pypi
icc_rt                    2022.1.0             h6049295_2  
icu                       58.2                 ha925a31_3  
idna                      3.4             py311haa95532_0  
imagesize                 1.4.1           py311haa95532_0  
importlib-metadata        6.0.0           py311haa95532_0  
importlib_metadata        6.0.0                hd3eb1b0_0  
inflection                0.5.1           py311haa95532_0  
intel-openmp              2023.1.0         h59b6b97_46319  
intervaltree              3.1.0              pyhd3eb1b0_0  
ipykernel                 6.19.2          py311h86cfffd_0  
ipython                   8.12.0          py311haa95532_0  
ipython_genutils          0.2.0              pyhd3eb1b0_1  
isort                     5.9.3              pyhd3eb1b0_0  
jaraco.classes            3.2.1              pyhd3eb1b0_0  
jedi                      0.18.1          py311haa95532_1  
jellyfish                 0.9.0           py311h2bbff1b_0  
jinja2                    3.1.2           py311haa95532_0  
jinja2-time               0.2.0              pyhd3eb1b0_3  
jpeg                      9e                   h2bbff1b_1  
jsonschema                4.17.3          py311haa95532_0  
jupyter_client            8.1.0           py311haa95532_0  
jupyter_core              5.3.0           py311haa95532_0  
jupyterlab_pygments       0.1.2                      py_0  
keyring                   23.13.1         py311haa95532_0  
kiwisolver                1.4.4           py311hd77b12b_0  
krb5                      1.19.4               h5b6d351_0  
lazy-object-proxy         1.6.0           py311h2bbff1b_0  
lerc                      3.0                  hd77b12b_0  
libbrotlicommon           1.0.9                h2bbff1b_7  
libbrotlidec              1.0.9                h2bbff1b_7  
libbrotlienc              1.0.9                h2bbff1b_7  
libclang                  14.0.6          default_hb5a9fac_1  
libclang13                14.0.6          default_h8e68704_1  
libdeflate                1.17                 h2bbff1b_0  
libffi                    3.4.4                hd77b12b_0  
libiconv                  1.16                 h2bbff1b_2  
libogg                    1.3.5                h2bbff1b_1  
libpng                    1.6.39               h8cc25b3_0  
libsodium                 1.0.18               h62dcd97_0  
libspatialindex           1.9.3                h6c2663c_0  
libtiff                   4.5.0                h6c2663c_2  
libvorbis                 1.3.7                he774522_0  
libwebp                   1.2.4                hbc33d0d_1  
libwebp-base              1.2.4                h2bbff1b_1  
libxml2                   2.10.3               h0ad7f3c_0  
libxslt                   1.1.37               h2bbff1b_0  
lxml                      4.9.2           py311h2bbff1b_0  
lz4-c                     1.9.4                h2bbff1b_0  
markupsafe                2.1.1           py311h2bbff1b_0  
matplotlib                3.7.1           py311haa95532_1  
matplotlib-base           3.7.1           py311hf62ec03_1  
matplotlib-inline         0.1.6           py311haa95532_0  
mccabe                    0.7.0              pyhd3eb1b0_0  
mistune                   0.8.4           py311h2bbff1b_1000  
mkl                       2023.1.0         h8bd8f75_46356  
mkl-service               2.4.0           py311h2bbff1b_1  
mkl_fft                   1.3.6           py311hf62ec03_1  
mkl_random                1.2.2           py311hf62ec03_1  
more-itertools            8.12.0             pyhd3eb1b0_0  
msgpack                   1.0.5                    pypi_0    pypi
munkres                   1.1.4                      py_0  
mypy_extensions           0.4.3           py311haa95532_1  
nbclient                  0.5.13          py311haa95532_0  
nbconvert                 6.5.4           py311haa95532_0  
nbformat                  5.7.0           py311haa95532_0  
nest-asyncio              1.5.6           py311haa95532_0  
numpy                     1.24.3          py311hdab7c0b_1  
numpy-base                1.24.3          py311hd01c5d8_1  
numpydoc                  1.5.0           py311haa95532_0  
openssl                   1.1.1t               h2bbff1b_0  
packaging                 23.0            py311haa95532_0  
pandas                    2.0.1                    pypi_0    pypi
pandocfilters             1.5.0              pyhd3eb1b0_0  
paramiko                  2.8.1              pyhd3eb1b0_0  
parso                     0.8.3              pyhd3eb1b0_0  
pathspec                  0.10.3          py311haa95532_0  
pcre                      8.45                 hd77b12b_0  
pexpect                   4.8.0              pyhd3eb1b0_3  
pickleshare               0.7.5           pyhd3eb1b0_1003  
pillow                    9.4.0           py311hd77b12b_0  
pip                       23.0.1          py311haa95532_0  
platformdirs              2.5.2           py311haa95532_0  
pluggy                    1.0.0           py311haa95532_1  
ply                       3.11            py311haa95532_0  
pooch                     1.4.0              pyhd3eb1b0_0  
poyo                      0.5.0              pyhd3eb1b0_0  
prompt-toolkit            3.0.36          py311haa95532_0  
proto-plus                1.22.2                   pypi_0    pypi
protobuf                  4.23.0                   pypi_0    pypi
psutil                    5.9.0           py311h2bbff1b_0  
ptyprocess                0.7.0              pyhd3eb1b0_2  
pure_eval                 0.2.2              pyhd3eb1b0_0  
py-geohash-any            1.1                      pypi_0    pypi
pyasn1                    0.5.0                    pypi_0    pypi
pyasn1-modules            0.3.0                    pypi_0    pypi
pycodestyle               2.10.0          py311haa95532_0  
pycparser                 2.21               pyhd3eb1b0_0  
pydocstyle                6.3.0           py311haa95532_0  
pyflakes                  3.0.1           py311haa95532_0  
pygments                  2.15.1          py311haa95532_0  
pyjwt                     2.7.0                    pypi_0    pypi
pylint                    2.16.2          py311haa95532_0  
pylint-venv               2.3.0           py311haa95532_0  
pyls-spyder               0.4.0              pyhd3eb1b0_0  
pynacl                    1.5.0           py311h8cc25b3_0  
pyopenssl                 23.0.0          py311haa95532_0  
pyparsing                 3.0.9           py311haa95532_0  
pyqt                      5.15.7          py311hd77b12b_0  
pyqt5-sip                 12.11.0         py311hd77b12b_0  
pyqtwebengine             5.15.7          py311hd77b12b_0  
pyrsistent                0.18.0          py311h2bbff1b_0  
pysocks                   1.7.1           py311haa95532_0  
python                    3.11.3               h966fe2a_0  
python-dateutil           2.8.2              pyhd3eb1b0_0  
python-fastjsonschema     2.16.2          py311haa95532_0  
python-geohash            0.8.5                    pypi_0    pypi
python-lsp-black          1.2.1           py311haa95532_0  
python-lsp-jsonrpc        1.0.0              pyhd3eb1b0_0  
python-lsp-server         1.7.2           py311haa95532_0  
python-slugify            5.0.2              pyhd3eb1b0_0  
pytoolconfig              1.2.5           py311haa95532_1  
pytz                      2022.7          py311haa95532_0  
pywin32                   305             py311h2bbff1b_0  
pywin32-ctypes            0.2.0           py311haa95532_1000  
pyyaml                    6.0             py311h2bbff1b_1  
pyzmq                     25.0.2          py311hd77b12b_0  
qdarkstyle                3.0.2              pyhd3eb1b0_0  
qstylizer                 0.2.2           py311haa95532_0  
qt-main                   5.15.2               he8e5bd7_8  
qt-webengine              5.15.9               hb9a9bb5_5  
qtawesome                 1.2.2           py311haa95532_0  
qtconsole                 5.4.2           py311haa95532_0  
qtpy                      2.2.0           py311haa95532_0  
qtwebkit                  5.212                h2bbfb41_5  
requests                  2.29.0          py311haa95532_0  
rope                      1.7.0           py311haa95532_0  
rsa                       4.9                      pypi_0    pypi
rtree                     1.0.1           py311h2eaa2aa_0  
scipy                     1.10.1          py311hc1ccb85_1  
setuptools                66.0.0          py311haa95532_0  
sip                       6.6.2           py311hd77b12b_0  
six                       1.16.0             pyhd3eb1b0_1  
snowballstemmer           2.2.0              pyhd3eb1b0_0  
sortedcontainers          2.4.0              pyhd3eb1b0_0  
soupsieve                 2.4             py311haa95532_0  
sphinx                    5.0.2           py311haa95532_0  
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0  
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0  
sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0  
sphinxcontrib-jsmath      1.0.1              pyhd3eb1b0_0  
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0  
sphinxcontrib-serializinghtml 1.1.5              pyhd3eb1b0_0  
spyder                    5.4.1           py311haa95532_0  
spyder-kernels            2.4.3           py311haa95532_0  
sqlite                    3.41.2               h2bbff1b_0  
stack_data                0.2.0              pyhd3eb1b0_0  
tbb                       2021.8.0             h59b6b97_0  
text-unidecode            1.3                pyhd3eb1b0_0  
textdistance              4.2.1              pyhd3eb1b0_0  
three-merge               0.1.1              pyhd3eb1b0_0  
tinycss2                  1.2.1           py311haa95532_0  
tk                        8.6.12               h2bbff1b_0  
toml                      0.10.2             pyhd3eb1b0_0  
tomlkit                   0.11.1          py311haa95532_0  
tornado                   6.2             py311h2bbff1b_0  
traitlets                 5.7.1           py311haa95532_0  
tzdata                    2023.3                   pypi_0    pypi
ujson                     5.4.0           py311hd77b12b_0  
unidecode                 1.2.0              pyhd3eb1b0_0  
uritemplate               4.1.1                    pypi_0    pypi
urllib3                   1.26.15         py311haa95532_0  
vc                        14.2                 h21ff451_1  
vs2015_runtime            14.27.29016          h5e58377_2  
watchdog                  2.1.6           py311haa95532_0  
wcwidth                   0.2.5              pyhd3eb1b0_0  
webencodings              0.5.1           py311haa95532_1  
whatthepatch              1.0.2           py311haa95532_0  
wheel                     0.38.4          py311haa95532_0  
win_inet_pton             1.1.0           py311haa95532_0  
wrapt                     1.14.1          py311h2bbff1b_0  
xz                        5.4.2                h8cc25b3_0  
yaml                      0.2.5                he774522_0  
yapf                      0.31.0             pyhd3eb1b0_0  
zeromq                    4.3.4                hd77b12b_0  
zipp                      3.11.0          py311haa95532_0  
zlib                      1.2.13               h8cc25b3_0  
zstd                      1.5.5                hd43e919_0  

@dramajohns
Copy link
Author

In addition, when I import the pandas (import pandas as pd) module the first time I get a message :

"This version of python seems to be incorrectly compiled
(internal generated filenames are not absolute).
This may make the debugger miss breakpoints.
Related bug: http://bugs.python.org/issue1666807"

@dalthviz
Copy link
Member

Hi @dramajohns thank you for the feedback! Seems like the initial issue described is a duplicate of #20496 To get the fix you will need to update to Spyder 5.4.3

For the message you are getting, I think that is a duplicate of #20800 which hopefully will be fixed in the next Spyder release (5.4.4)

Let us know if the info above and updating Spyder helps!

@dramajohns
Copy link
Author

The Problem is resolved after updating to Spyder 5.4.3.

Thank you for your help and quick reply !

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