Running user-defined functions on console return only when stopped manually
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Hello, When calling various user-defined functions or creating instances of user-defined classes from console, it will run indefinitely until I press Stop debugging (Ctrl+Shift+F12) twice, although I wasn’t even in debugging mode, just running commands from the console. Furthermore, for some reason the command won’t start to run until I press Shift+Enter (pressing Enter will do nothing). When printing the running time at various locations in the function, the times are printed only after pressing Stop debugging twice. Also, the times correspond to regular running time, i.e. very short. So I figure that the function runs and then gets stuck before returning for some reason. This does not happen for every user defined function or class, and I could not identify the pattern. However, when it does happen for some function, it is quite consistent. It always happens only at first call to the function with some set of inputs. If I run the same again, it will run normally. But if I change the inputs to the function, it is stuck again. When running the cell/file, this problem does not occur. It also does not occur when running ipython from terminal. It does occur when running it from a jupyter qtconsole. Please tell me If I should delete this and post it on jupyter qtconsole issues instead. I know this might seem like a strange and maybe ill-described problem, but this problem is bugging me for a very long time, through different versions of anaconda and spyder and on different computers. I appreciate any help.
What steps reproduce the problem?
- Define some function
- Run it from console
What is the expected output? What do you see instead?
Expected: Normal execution of the command after pressing Enter. Instead the command won’t start to run upon Enter and when pressing Shift+Enter it will run indefinitely until pressing Stop debugging twice which will make the function return. Sometimes Ctrl+C also makes the function return.
Versions
- Spyder version: 5.1.5 None
- Python version: 3.8.12 64-bit
- Qt version: 5.9.7
- PyQt5 version: 5.9.2
- Operating System: Linux 5.4.0-90-generic
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 2.0.0 (OK)
cookiecutter >=1.6.0 : 1.7.2 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=7.6.0 : 7.29.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.17.2 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
keyring >=17.0.0 : 23.1.0 (OK)
nbconvert >=4.0 : 6.1.0 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
parso >=0.7.0;<0.9.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.8.0 (OK)
pygments >=2.0 : 2.10.0 (OK)
pylint >=2.5.0;<2.10.0 : 2.9.6 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.2.2;<1.3.0 : 1.2.4 (OK)
pylsp_black >=1.0.0 : None (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.1.10 (OK)
qtawesome >=1.0.2 : 1.0.2 (OK)
qtconsole >=5.1.0 : 5.1.1 (OK)
qtpy >=1.5.0 : 1.10.0 (OK)
rtree >=0.9.7 : 0.9.7 (OK)
setuptools >=49.6.0 : 58.0.4 (OK)
sphinx >=0.6.6 : 4.2.0 (OK)
spyder_kernels >=2.1.1;<2.2.0 : 2.1.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.3 (OK)
xdg >=0.26 : 0.27 (OK)
zmq >=17 : 22.2.1 (OK)
# Optional:
cython >=0.21 : 0.29.24 (OK)
matplotlib >=2.0.0 : 3.4.3 (OK)
numpy >=1.7 : 1.20.3 (OK)
pandas >=1.1.1 : 1.3.4 (OK)
scipy >=0.17.0 : 1.7.1 (OK)
sympy >=0.7.3 : 1.9 (OK)```
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thank you anyway, really appreciate your work. Hopefully you’ll also support Julia someday.
Closing because I don’t think we can do something else about this.