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

KeyError when trying to run code is still present in 6.0.3 #23299

Open
mbassalbioinformatics opened this issue Dec 16, 2024 · 8 comments
Open
Assignees
Milestone

Comments

@mbassalbioinformatics
Copy link

Description

What steps will reproduce the problem?

pasted code into spyder and tried to run, then crash

Traceback

Traceback (most recent call last):
  File "/Users/mahmoud/Library/spyder-6/envs/spyder-runtime/lib/python3.11/site-packages/spyder/plugins/run/container.py", line 214, in run_file
    self.edit_run_configurations(
  File "/Users/mahmoud/Library/spyder-6/envs/spyder-runtime/lib/python3.11/site-packages/spyder/plugins/run/container.py", line 232, in edit_run_configurations
    self.dialog.setup()
  File "/Users/mahmoud/Library/spyder-6/envs/spyder-runtime/lib/python3.11/site-packages/spyder/plugins/run/widgets.py", line 760, in setup
    self.run_conf_model.get_initial_index())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mahmoud/Library/spyder-6/envs/spyder-runtime/lib/python3.11/site-packages/spyder/plugins/run/models.py", line 192, in get_initial_index
    return self.inverted_index[self.current_configuration]
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: None

Versions

  • Spyder version: 6.0.3 (standalone)
  • Python version: 3.11.10 64-bit
  • Qt version: 5.15.8
  • PyQt5 version: 5.15.9
  • Operating System: macOS-15.1.1-arm64-arm-64bit

Dependencies

# Mandatory:
aiohttp >=3.9.3                  :  3.11.10 (OK)
asyncssh >=2.14.0,<3.0.0         :  2.18.0 (OK)
atomicwrites >=1.2.0             :  1.4.1 (OK)
chardet >=2.0.0                  :  5.2.0 (OK)
cloudpickle >=0.5.0              :  3.1.0 (OK)
cookiecutter >=1.6.0             :  2.6.0 (OK)
diff_match_patch >=20181111      :  20241021 (OK)
github >=2.3.0                   :  2.5.0 (OK)
importlib_metadata >=4.6.0       :  8.5.0 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.30.0 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.2 (OK)
jellyfish >=0.7                  :  1.1.2 (OK)
jsonschema >=3.2.0               :  4.23.0 (OK)
keyring >=17.0.0                 :  25.5.0 (OK)
nbconvert >=4.0                  :  7.16.4 (OK)
numpydoc >=0.6.0                 :  1.8.0 (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.1.0 (OK)
pygments >=2.0                   :  2.18.0 (OK)
pylint >=3.1,<4                  :  3.3.2 (OK)
pylint_venv >=3.0.2              :  3.0.4 (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)
pyuca >=1.2                      :  1.2 (OK)
qdarkstyle >=3.2.0,<3.3.0        :  3.2.3 (OK)
qstylizer >=0.2.2                :  0.2.4 (OK)
qtawesome >=1.3.1,<1.4.0         :  1.3.1 (OK)
qtconsole >=5.6.1,<5.7.0         :  5.6.1 (OK)
qtpy >=2.4.0                     :  2.4.2 (OK)
rtree >=0.9.7                    :  1.3.0 (OK)
setuptools >=49.6.0              :  75.6.0 (OK)
sphinx >=0.6.6                   :  8.1.3 (OK)
spyder_kernels >=3.0.2,<3.1.0    :  3.0.2 (OK)
superqt >=0.6.2,<1.0.0           :  0.6.7 (OK)
textdistance >=4.2.0             :  4.6.2 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  6.0.0 (OK)
yarl >=1.9.4                     :  1.18.3 (OK)
zmq >=24.0.0                     :  26.2.0 (OK)

# Optional:
cython >=0.21                    :  3.0.11 (OK)
matplotlib >=3.0.0               :  3.9.3 (OK)
numpy >=1.7                      :  2.2.0 (OK)
pandas >=1.1.1                   :  2.2.3 (OK)
scipy >=0.17.0                   :  1.14.1 (OK)
sympy >=0.7.3                    :  1.13.3 (OK)

Environment

Environment
# packages in environment at /Users/mahmoud/miniforge3/envs/scRNA:
#
# Name                    Version                   Build  Channel
anndata                   0.10.9             pyhd8ed1ab_0    conda-forge
appnope                   0.1.4                    pypi_0    pypi
array-api-compat          1.9                pyhd8ed1ab_0    conda-forge
asttokens                 2.4.1                    pypi_0    pypi
bedtools                  2.31.1               he85ad4a_3    bioconda
biopython                 1.84                     pypi_0    pypi
brotli                    1.1.0                hd74edd7_2    conda-forge
brotli-bin                1.1.0                hd74edd7_2    conda-forge
bzip2                     1.0.8                h99b78c6_7    conda-forge
c-ares                    1.34.2               h7ab814d_0    conda-forge
ca-certificates           2024.12.14           hf0a4a13_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cellphonedb               5.0.1                    pypi_0    pypi
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
cffi                      1.17.1                   pypi_0    pypi
cfgv                      3.4.0                    pypi_0    pypi
charset-normalizer        3.4.0                    pypi_0    pypi
click                     8.1.7                    pypi_0    pypi
cloudpickle               3.1.0                    pypi_0    pypi
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.2.2                    pypi_0    pypi
contourpy                 1.3.0           py311h2c37856_2    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
debugpy                   1.8.7                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
distlib                   0.3.9                    pypi_0    pypi
docrep                    0.3.2                    pypi_0    pypi
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
executing                 2.1.0                    pypi_0    pypi
fbpca                     1.0                      pypi_0    pypi
filelock                  3.16.1                   pypi_0    pypi
fonttools                 4.54.1          py311h460d6c5_0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
geosketch                 1.2                      pypi_0    pypi
get-annotations           0.1.2              pyhd8ed1ab_0    conda-forge
gseapy                    1.1.3                    pypi_0    pypi
h5py                      3.11.0          nompi_py311h0fa3d65_103    conda-forge
hdf5                      1.14.3          nompi_hec07895_105    conda-forge
icu                       75.1                 hfee45f7_0    conda-forge
identify                  2.6.1                    pypi_0    pypi
idna                      3.10                     pypi_0    pypi
iniconfig                 2.0.0                    pypi_0    pypi
ipykernel                 6.29.5                   pypi_0    pypi
ipython                   8.28.0                   pypi_0    pypi
jedi                      0.19.1                   pypi_0    pypi
jinja2                    3.1.4                    pypi_0    pypi
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
jupyter-client            8.6.3                    pypi_0    pypi
jupyter-core              5.7.2                    pypi_0    pypi
kiwisolver                1.4.7           py311h2c37856_0    conda-forge
krb5                      1.21.3               h237132a_0    conda-forge
ktplotspy                 0.2.4                    pypi_0    pypi
lcms2                     2.16                 ha0e7c42_0    conda-forge
legacy-api-wrap           1.4                pyhd8ed1ab_1    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
liana                     1.4.0                    pypi_0    pypi
libaec                    1.1.3                hebf3989_0    conda-forge
libblas                   3.9.0           24_osxarm64_openblas    conda-forge
libbrotlicommon           1.1.0                hd74edd7_2    conda-forge
libbrotlidec              1.1.0                hd74edd7_2    conda-forge
libbrotlienc              1.1.0                hd74edd7_2    conda-forge
libcblas                  3.9.0           24_osxarm64_openblas    conda-forge
libcurl                   8.10.1               h13a7ad3_0    conda-forge
libcxx                    19.1.2               ha82da77_0    conda-forge
libdeflate                1.22                 hd74edd7_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h93a5062_2    conda-forge
libexpat                  2.6.3                hf9b8971_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           13_2_0_hd922786_3    conda-forge
libgfortran5              13.2.0               hf226fd6_3    conda-forge
libhwloc                  2.11.1          default_h7685b71_1000    conda-forge
libiconv                  1.17                 h0d3ecfb_2    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblapack                 3.9.0           24_osxarm64_openblas    conda-forge
libllvm14                 14.0.6               hd1a9a77_4    conda-forge
liblzma                   5.6.3                h39f12f2_1    conda-forge
libnghttp2                1.58.0               ha4dd798_1    conda-forge
libopenblas               0.3.27          openmp_h517c56d_1    conda-forge
libpng                    1.6.44               hc14010f_0    conda-forge
libsqlite                 3.46.1               hc14010f_0    conda-forge
libssh2                   1.11.0               h7a5bd25_0    conda-forge
libtiff                   4.7.0                hfce79cd_1    conda-forge
libwebp-base              1.4.0                h93a5062_0    conda-forge
libxcb                    1.17.0               hdb1d25a_0    conda-forge
libxml2                   2.12.7               h01dff8b_4    conda-forge
libzlib                   1.3.1                h8359307_2    conda-forge
llvm-openmp               19.1.1               hb52a8e5_1    conda-forge
llvmlite                  0.43.0          py311hc367efa_1    conda-forge
loompy                    3.0.7                    pypi_0    pypi
markupsafe                3.0.1                    pypi_0    pypi
matplotlib-base           3.9.2           py311hbe3227e_1    conda-forge
matplotlib-inline         0.1.7                    pypi_0    pypi
mizani                    0.9.3                    pypi_0    pypi
mousipy                   0.1.5                    pypi_0    pypi
mudata                    0.3.1                    pypi_0    pypi
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
natsort                   8.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.5                  h7bae524_1    conda-forge
nest-asyncio              1.6.0                    pypi_0    pypi
networkx                  3.4.1              pyhd8ed1ab_0    conda-forge
nodeenv                   1.9.1                    pypi_0    pypi
numba                     0.60.0          py311h9506ed5_0    conda-forge
numpy                     1.26.4                   pypi_0    pypi
numpy-groupies            0.11.2                   pypi_0    pypi
openjpeg                  2.5.2                h9f1df11_0    conda-forge
openssl                   3.4.0                h39f12f2_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pandas                    2.2.3           py311h9cb3ce9_1    conda-forge
parso                     0.8.4                    pypi_0    pypi
patsy                     0.5.6              pyhd8ed1ab_0    conda-forge
pexpect                   4.9.0                    pypi_0    pypi
pillow                    10.4.0          py311hc903d1b_1    conda-forge
pip                       24.2               pyh8b19718_1    conda-forge
platformdirs              4.3.6                    pypi_0    pypi
plotnine                  0.12.4                   pypi_0    pypi
pluggy                    1.5.0                    pypi_0    pypi
polars                    1.9.0                    pypi_0    pypi
pre-commit                4.0.1                    pypi_0    pypi
prompt-toolkit            3.0.48                   pypi_0    pypi
psutil                    6.0.0                    pypi_0    pypi
pthread-stubs             0.4               hd74edd7_1002    conda-forge
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.3                    pypi_0    pypi
pybedtools                0.10.0                   pypi_0    pypi
pycparser                 2.22                     pypi_0    pypi
pygments                  2.18.0                   pypi_0    pypi
pynndescent               0.5.13             pyhff2d567_0    conda-forge
pyparsing                 3.2.0              pyhd8ed1ab_1    conda-forge
pysam                     0.22.1                   pypi_0    pypi
pytest                    8.3.3                    pypi_0    pypi
python                    3.11.10         hc51fdd5_3_cpython    conda-forge
python-circos             0.3.0                    pypi_0    pypi
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-tzdata             2024.2             pyhd8ed1ab_0    conda-forge
python_abi                3.11                    5_cp311    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.2                    pypi_0    pypi
pyzmq                     26.2.0                   pypi_0    pypi
qhull                     2020.2               h420ef59_5    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
requests                  2.32.3                   pypi_0    pypi
rpy2                      3.5.16                   pypi_0    pypi
scanpy                    1.10.3             pyhd8ed1ab_0    conda-forge
scikit-learn              1.5.2           py311h9e23f0f_1    conda-forge
scipy                     1.14.1          py311h2929bc6_0    conda-forge
scvelo                    0.3.2                    pypi_0    pypi
seaborn                   0.13.2               hd8ed1ab_2    conda-forge
seaborn-base              0.13.2             pyhd8ed1ab_2    conda-forge
session-info              1.0.0              pyhd8ed1ab_0    conda-forge
setuptools                75.1.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
spyder-kernels            3.0.0                    pypi_0    pypi
stack-data                0.6.3                    pypi_0    pypi
statsmodels               0.14.4          py311h0f07fe1_0    conda-forge
stdlib-list               0.10.0             pyhd8ed1ab_0    conda-forge
tbb                       2021.13.0            h7b3277c_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tornado                   6.4.1                    pypi_0    pypi
tqdm                      4.66.5             pyhd8ed1ab_0    conda-forge
traitlets                 5.14.3                   pypi_0    pypi
typing-extensions         4.12.2                   pypi_0    pypi
tzdata                    2024b                hc8b5060_0    conda-forge
tzlocal                   5.2                      pypi_0    pypi
umap-learn                0.5.6           py311h267d04e_1    conda-forge
urllib3                   2.2.3                    pypi_0    pypi
virtualenv                20.26.6                  pypi_0    pypi
wcwidth                   0.2.13                   pypi_0    pypi
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
wurlitzer                 3.1.1                    pypi_0    pypi
xorg-libxau               1.0.11               hd74edd7_1    conda-forge
xorg-libxdmcp             1.1.5                hd74edd7_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
zstd                      1.5.6                hb46c0d2_0    conda-forge

@athompson673
Copy link
Contributor

@ccordoba12 perhaps #22607 not fully fixed in 6.0.3?

@mbassalbioinformatics
Copy link
Author

mbassalbioinformatics commented Dec 18, 2024 via email

@ccordoba12
Copy link
Member

@ccordoba12 perhaps #22607 not fully fixed in 6.0.3?

It seems it's not, but I don't understand why.

@mbassalbioinformatics, please post a series of clear steps that always lead to generating the error. That way we'll be able to reproduce and fix it in a future version.

@mbassalbioinformatics
Copy link
Author

@ccordoba12
I copied the code into spyder. Pasted with CMD+V. Attempted to run the first line of code with F9. Then Spyder crashed.

I tried again, relaunching, pasting, running line 1. Crash again.

@ccordoba12
Copy link
Member

@mbassalbioinformatics, I can't reproduce this with your instructions, sorry.

Please post a video of what you're doing so I can follow it on my side.

@ccordoba12 ccordoba12 changed the title trying to run code KerError when trying to run code is still present in 6.0.3 Jan 4, 2025
@ccordoba12 ccordoba12 added this to the v6.0.5 milestone Jan 4, 2025
@ccordoba12
Copy link
Member

@mbassalbioinformatics, any luck with the video? We really need it to be able to reproduce this problem.

@mbassalbioinformatics
Copy link
Author

Not really, i closed the windows ages ago and so cant get back to the same crash.
Could it be to do with invisible characters that were copied across causing it to crash?

@ccordoba12
Copy link
Member

Could it be to do with invisible characters that were copied across causing it to crash?

Perhaps. Do you have at hand the contents of the file you were copy/pasting to Spyder?

@ccordoba12 ccordoba12 changed the title KerError when trying to run code is still present in 6.0.3 KeyError when trying to run code is still present in 6.0.3 Jan 9, 2025
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

3 participants