spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.21k stars 1.59k forks source link

Kernel keeps dying #21962

Closed lmcg62 closed 2 months ago

lmcg62 commented 5 months ago

Description

What steps will reproduce the problem?

import numpy as np import nme input_fname = "/Users/larissa.mcginn/Desktop/Internship files/Testdata.bdf" raw = mne.io.read_raw_bdf(input_fname) print(raw) print(raw.info) raw.plot(start=0, duration=10) raw.compute_psd(fmin=30,fmax=100).plot(picks="data", exclude="bads") raw.plot(duration=5, n_channels=10)

Traceback

Traceback (most recent call last):
  File "/Users/larissa.mcginn/Applications/MNE-Python/1.6.1_0/.mne-python/lib/python3.11/site-packages/spyder/workers/updates.py", line 116, in start
    channel, channel_url = get_spyder_conda_channel()
    ^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

Versions

Dependencies

# Mandatory:
applaunchservices >=0.3.0        :  0.3.0 (OK)
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.5.0 (OK)
diff_match_patch >=20181111      :  20230430 (OK)
intervaltree >=3.0.2             :  3.1.0 (OK)
IPython >=8.13.0,<9.0.0,!=8.17.1 :  8.17.2 (OK)
jedi >=0.17.2,<0.20.0            :  0.19.1 (OK)
jellyfish >=0.7                  :  1.0.3 (OK)
jsonschema >=3.2.0               :  4.21.0 (OK)
keyring >=17.0.0                 :  24.3.0 (OK)
nbconvert >=4.0                  :  7.14.2 (OK)
numpydoc >=0.6.0                 :  1.6.0 (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.7 (OK)
pygments >=2.0                   :  2.17.2 (OK)
pylint >=2.5.0,<3.1              :  3.0.3 (OK)
pylint_venv >=3.0.2              :  3.0.3 (OK)
pyls_spyder >=0.4.0              :  0.4.0 (OK)
pylsp >=1.9.0,<1.10.0            :  1.9.0 (OK)
pylsp_black >=1.2.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.2 (OK)
qtawesome >=1.2.1                :  1.3.0 (OK)
qtconsole >=5.5.0,<5.6.0         :  5.5.1 (OK)
qtpy >=2.1.0                     :  2.4.1 (OK)
rtree >=0.9.7                    :  1.1.0 (OK)
setuptools >=49.6.0              :  69.0.3 (OK)
sphinx >=0.6.6                   :  7.2.6 (OK)
spyder_kernels >=2.5.0,<2.6.0    :  2.5.0 (OK)
textdistance >=4.2.0             :  4.5.0 (OK)
three_merge >=0.1.1              :  0.1.1 (OK)
watchdog >=0.10.3                :  3.0.0 (OK)
zmq >=22.1.0                     :  25.1.2 (OK)

# Optional:
cython >=0.21                    :  None (NOK)
matplotlib >=3.0.0               :  3.8.2 (OK)
numpy >=1.7                      :  1.26.3 (OK)
pandas >=1.1.1                   :  2.1.4 (OK)
scipy >=0.17.0                   :  1.11.4 (OK)
sympy >=0.7.3                    :  1.12 (OK)
ccordoba12 commented 5 months ago

Hey @lmcg62, thanks for reporting. The problem related to the traceback shown above is fixed in our latest version (5.5.3). And I think the crash you mentioned about running mne code is fixed in that version too.

@larsoner, @drammock, does a more recent version of MNE come with Spyder 5.5.3?

drammock commented 5 months ago

Spyder 5.5.3 is what our installer currently specifies:

https://github.com/mne-tools/mne-installers/blob/1b46aea1bd978c15ad8c656c7c7418d8223e6658/recipes/mne-python/construct.yaml#L106

...but AFAICT the last released installer used 5.5.0 (which matches what @lmcg62 reports above). A new installer will come out after our release of MNE 1.7, which is due this month.

ccordoba12 commented 5 months ago

Thanks @drammock for the info! Do you have nightly installers to test and see if @lmcg62's kernel crash is solved in 5.5.3?

drammock commented 5 months ago

no we don't currently provide nightly installers, sorry. FWIW, our "installer" is more like anaconda, it bundles MNE-Python plus dependencies, IDEs, and optional related analysis packages, creates a conda env for the user, etc. It's not just MNE-Python (which is pure python and can be installed directly from github if you want the latest dev version).

ccordoba12 commented 5 months ago

Ok, so how you do you install MNE as a Python package? I looked for it in Conda-forge and found several packages that start with mne, so I don't know which one to use.

drammock commented 5 months ago

conda install mne or pip install mne. The standalone installer is, as I said, an anaconda-like thing that installs a whole environment including lots of extra stuff including IDEs. We do this as a way to make it easier to get started with MNE for someone who is new to Python and used to MATLAB / GUIs.

ccordoba12 commented 5 months ago

Thanks @drammock!

@mrclary, could you check if you're able to reproduce this problem on a Mac? Thanks!

mrclary commented 4 months ago

I'm not sure what you want me to test. I was able to create an environment and launch Spyder from that environment.

$ mamba create -n mne python=3.10 mne spyder

I did not see any issues. If the kernel crashes as a result of running code, then I would need the Testdata.bdf file referenced in the OP in order to run that code.

ccordoba12 commented 4 months ago

Oh yeah, sorry, I didn't see that @lmcg62 was using a bdf file in their code.

@lmcg62, could you upload that file to test things in our side? Thanks!

drammock commented 4 months ago

(meanwhile, our latest installer is out, which should ship Spyder 5.5.3 5.5.4)

ccordoba12 commented 4 months ago

Thanks for the news @drammock!

ccordoba12 commented 2 months ago

Closing because we didn't hear back from @lmcg62, Hopefully the problem is solved for you now.