spyder-ide / spyder

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

Clicking error message in console does not take editor to appropriate line #15545

Closed BlacksheepVMF-214 closed 3 years ago

BlacksheepVMF-214 commented 3 years ago

Issue Report Checklist

Problem Description

While running a Python program, an error message is created in the console. Clicking the error message should take me to the appropriate line in the Python code (and it did so in earlier versions of Spyder), but it does not now. The mouse pointer changes to a finger when hovering over the error message, but clicking has no effect.

What steps reproduce the problem?

  1. Run a Python program that has a coding error. An error message is generated in the console; this error message has an associated line number from the Python program.
  2. Click the generated error message in the console. Nothing happens.

What is the expected output? What do you see instead?

I expect that clicking the error message in the console would move the current line in the editor to the corresponding line that contains the error. What I see instead is that nothing happens.

Paste Traceback/Error Below (if applicable)


N/A. There is no Python error generated by the problem.

Versions

Dependencies


# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  1.6.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.22.0 (OK)
jedi =0.17.2                  :  0.17.2 (OK)
jsonschema >=3.2.0            :  3.2.0 (OK)
keyring >=17.0.0              :  22.3.0 (OK)
nbconvert >=4.0               :  6.0.7 (OK)
numpydoc >=0.6.0              :  1.1.0 (OK)
paramiko >=2.4.0              :  2.7.2 (OK)
parso =0.7.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.8.1 (OK)
pylint >=1.0                  :  2.7.4 (OK)
pyls >=0.36.2;<1.0.0          :  0.36.2 (OK)
pyls_black >=0.4.6            :  0.4.6 (OK)
pyls_spyder >=0.3.2           :  0.3.2 (OK)
qdarkstyle =3.0.2             :  3.0.2 (OK)
qstylizer >=0.1.10            :  0.1.10 (OK)
qtawesome >=0.5.7             :  1.0.2 (OK)
qtconsole >=5.0.3             :  5.0.3 (OK)
qtpy >=1.5.0                  :  1.9.0 (OK)
rtree >=0.8.3                 :  0.9.7 (OK)
setuptools >=39.0.0           :  52.0.0.post20210125 (OK)
sphinx >=0.6.6                :  3.5.3 (OK)
spyder_kernels >=2.0.1;<2.1.0 :  2.0.1 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0      :  1.0.2 (OK)
zmq >=17                      :  20.0.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=2.0.0            :  None (NOK)
numpy >=1.7                   :  None (NOK)
pandas >=1.1.1                :  None (NOK)
scipy >=0.17.0                :  None (NOK)
sympy >=0.7.3                 :  None (NOK)
juanis2112 commented 3 years ago

Hi @BlacksheepVMF-214. Thanks for reporting this. Please upgrade your Spyder to 5.0.1 and let us know if the issue persists. You can download it from out webpage https://www.spyder-ide.org/#section-download

BlacksheepVMF-214 commented 3 years ago

My apologies for the delay in responding; things got in the way (work, life, ...).

After several false starts, I finally got Spyder 5.0.2 correctly installed; I am no longer having this issue.

This also solved an additional issue: The text of menu options was overlapping their associated icons.

Thank you, and have a great day.

ccordoba12 commented 3 years ago

Great! Thanks for letting us know about it.

pyLP7 commented 2 years ago

Hi @ccordoba12, @BlacksheepVMF-214,

I am actually facing a similar issue here. I got the latest Spyder version available on Anaconda, i.e. Spyder 5.1.5.

The mouse pointer is not even changing into a finger when I move it over the error message and even if I click (nor double click) nothing happens. grafik

Any idea why? Thanks!

ccordoba12 commented 2 years ago

@pyLP7, this should be fixed in the latest version available in Anaconda (5.1.5). You're probably using an older version, so please update.

pyLP7 commented 2 years ago

Hi @ccordoba12, I wish I could say yes, but unfortunately that's not the case. I am really running Spyder version 5.1.5. that I installed from Anaconda distribution. I am running Spyder on Windows 10. I enclosed below are the packages that I have in the virtual environment that I am currently using:

absl-py==1.0.0 alabaster==0.7.12 appdirs==1.4.4 arrow==1.2.2 astroid==2.6.6 asttokens==2.0.5 atomicwrites==1.4.0 attrs==21.4.0 autopep8==1.6.0 Babel==2.9.1 backcall==0.2.0 bcrypt==3.2.0 beautifulsoup4==4.11.1 binaryornot==0.4.4 black==19.10b0 bleach==4.1.0 brotlipy==0.7.0 certifi==2022.5.18.1 cffi==1.15.0 chardet==4.0.0 charset-normalizer==2.0.4 click==8.0.4 cloudpickle==2.0.0 colorama==0.4.4 cookiecutter==1.7.3 cryptography==37.0.1 debugpy==1.5.1 decorator==5.1.1 defusedxml==0.7.1 diff-match-patch==20200713 docutils==0.17.1 entrypoints==0.4 executing==0.8.3 fastjsonschema==2.15.1 flake8==3.9.2 idna==3.3 imagesize==1.3.0 importlib-metadata==4.11.3 importlib-resources==5.2.0 inflection==0.5.1 intervaltree==3.1.0 ipykernel==6.9.1 ipython==8.3.0 ipython-genutils==0.2.0 isort==5.9.3 jedi==0.18.1 Jinja2==3.0.3 jinja2-time==0.2.0 jsonschema==4.4.0 jupyter-client==6.1.12 jupyter-core==4.10.0 jupyterlab-pygments==0.1.2 keyring==23.4.0 lazy-object-proxy==1.6.0 MarkupSafe==2.1.1 matplotlib-inline==0.1.2 mccabe==0.6.1 mistune==0.8.4 mypy-extensions==0.4.3 nbclient==0.5.13 nbconvert==6.4.4 nbformat==5.3.0 nest-asyncio==1.5.5 numpydoc==1.2 ortools==9.1.9490 packaging==21.3 pandocfilters==1.5.0 paramiko==2.8.1 parso==0.8.3 pathspec==0.7.0 pexpect==4.8.0 pickleshare==0.7.5 pip==21.2.2 pluggy==1.0.0 poyo==0.5.0 prompt-toolkit==3.0.20 protobuf==3.19.1 psutil==5.8.0 ptyprocess==0.7.0 pure-eval==0.2.2 pycodestyle==2.7.0 pycparser==2.21 pydocstyle==6.1.1 pyflakes==2.3.1 Pygments==2.11.2 pylint==2.9.6 pyls-spyder==0.4.0 PyNaCl==1.4.0 pyOpenSSL==22.0.0 pyparsing==3.0.4 pyrsistent==0.18.0 PySocks==1.7.1 python-dateutil==2.8.2 python-lsp-black==1.0.0 python-lsp-jsonrpc==1.0.0 python-lsp-server==1.2.4 python-slugify==5.0.2 pytz==2021.3 pywin32==302 pywin32-ctypes==0.2.0 PyYAML==6.0 pyzmq==22.3.0 QDarkStyle==3.0.2 qstylizer==0.1.10 QtAwesome==1.0.3 qtconsole==5.3.0 QtPy==2.0.1 regex==2022.3.15 requests==2.27.1 rope==0.22.0 Rtree==0.9.7 setuptools==61.2.0 sip==4.19.13 six==1.16.0 snowballstemmer==2.2.0 sortedcontainers==2.4.0 soupsieve==2.3.1 Sphinx==4.4.0 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 spyder==5.1.5 spyder-kernels==2.1.3 stack-data==0.2.0 testpath==0.5.0 text-unidecode==1.3 textdistance==4.2.1 three-merge==0.1.1 tinycss==0.4 toml==0.10.2 tornado==6.1 traitlets==5.1.1 typed-ast==1.4.3 typing_extensions==4.1.1 ujson==5.1.0 Unidecode==1.2.0 urllib3==1.26.9 watchdog==2.1.6 wcwidth==0.2.5 webencodings==0.5.1 wheel==0.37.1 win-inet-pton==1.1.0 wincertstore==0.2 wrapt==1.12.1 yapf==0.31.0 zipp==3.8.0

ccordoba12 commented 2 years ago

Then it should be fixed for sure in our latest version (5.3.1).

Since it's still not available in Anaconda, you have two options:

  1. Use our Windows installer, which you can find here.
  2. Create a new environment with conda-forge packages. For that, please close Spyder, open the Anaconda Prompt and run the following commands there:

    conda create -n spyder-cf -c conda-forge spyder
    conda activate spyder-cf
    spyder
pyLP7 commented 2 years ago

The second one worked fine for me. Thank you very much @ccordoba12!

luca-morino commented 2 years ago

Hi! Had the same problem as you. If you want to stay in Anaconda then my workaround was to downgrade the IPython console to 7.31.1

DVPombo commented 1 year ago

@ccordoba12 After a few tries your steps worked. I needed to install pip install spyder-kernels==2.3.* in order to make it work. However, the cursor does not turn into a hand anymore. But at least it takes me to the error line.

ccordoba12 commented 1 year ago

However, the cursor does not turn into a hand anymore. But at least it takes me to the error line.

Yeah, I introduced that small regression last year but I'll try to fix it in our next version.

marianux commented 1 year ago

Hi, I am facing this same issue. Any idea or workaround ? Thanks in advance!

Mandatory:

atomicwrites >=1.2.0 : 1.4.1 (OK) chardet >=2.0.0 : 5.1.0 (OK) cloudpickle >=0.5.0 : 2.2.1 (OK) cookiecutter >=1.6.0 : 2.1.1 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.1.0 (OK) IPython >=7.31.1;<9.0.0 : 8.11.0 (OK) jedi >=0.17.2;<0.19.0 : 0.18.2 (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 : 7.2.9 (OK) numpydoc >=0.6.0 : 1.5.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.4 (OK) pygments >=2.0 : 2.14.0 (OK) pylint >=2.5.0;<3.0 : 2.16.3 (OK) pylint_venv >=2.1.1 : 3.0.1 (OK) pyls_spyder >=0.4.0 : 0.4.0 (OK) pylsp >=1.7.1;<1.8.0 : 1.7.1 (OK) pylsp_black >=1.2.0 : 1.2.1 (OK) qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (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.0 (OK) qtpy >=2.1.0 : 2.3.0 (OK) rtree >=0.9.7 : 1.0.1 (OK) setuptools >=49.6.0 : 67.4.0 (OK) sphinx >=0.6.6 : 6.1.3 (OK) spyder_kernels >=2.4.2;<2.5.0 : 2.4.2 (OK) textdistance >=4.2.0 : 4.5.0 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3 : 2.3.1 (OK) xdg >=0.26 : 0.28 (OK) zmq >=22.1.0 : 25.0.0 (OK)

Optional:

cython >=0.21 : None (NOK) matplotlib >=3.0.0 : 3.7.0 (OK) numpy >=1.7 : 1.24.2 (OK) pandas >=1.1.1 : None (NOK) scipy >=0.17.0 : 1.9.3 (OK) sympy >=0.7.3 : 1.11.1 (OK)

ccordoba12 commented 1 year ago

@marianux, this problem resurfaced again with IPython 8. We'll try to fix it in our next version (5.4.3), to be released at the end of the month.

Miguel-LlamasLanza commented 1 year ago

Can we downgrade ipython to 7.x, as a workaround until it is solved in 5.4.3? Or will this result in any issue?

ccordoba12 commented 1 year ago

Sure, you can do that too.

AdrienMau commented 1 year ago

Same error here with a brand new computer on Windows 11 and a new Anaconda3 installation, with Spyder 5.4.1, Ipython 8.10.0 and Python 310.9. Cannot click the error, cursor does not change.

ccordoba12 commented 1 year ago

@AdrienMau, this problem is fixed in our latest version (5.4.3), released last month. So, please update to it.

jna00 commented 3 months ago

It is possible this has again resurfaced. I installed spyder yesterday and the jump to the error line from the IPyhon interprterer doesn't seem to worlk.

ccordoba12 commented 3 months ago

@jna00, please open a new issue about your problem so we can take a look at it again.