spyder: TypeError when hovering in the editor

Description

What steps will reproduce the problem?

  1. go to anaconda
  2. open spyder console
  3. go to new file to add

Traceback

  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\editor\widgets\codeeditor.py", line 1295, in handle_hover_response
    self._request_hover_clicked)
TypeError: CodeEditor.sig_display_object_info[str, bool].emit(): argument 1 has unexpected type 'list'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\990112578\Anaconda3\lib\logging\__init__.py", line 1025, in emit
    msg = self.format(record)
  File "C:\Users\990112578\Anaconda3\lib\logging\__init__.py", line 869, in format
    return fmt.format(record)
  File "C:\Users\990112578\Anaconda3\lib\logging\__init__.py", line 608, in format
    record.message = record.getMessage()
  File "C:\Users\990112578\Anaconda3\lib\logging\__init__.py", line 369, in getMessage
    msg = msg % self.args
ValueError: incomplete format
Call stack:
  File "C:\Users\990112578\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\app\start.py", line 205, in main
    mainwindow.main()
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3718, in main
    mainwindow = run_spyder(app, options, args)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3600, in run_spyder
    app.exec_()
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\languageserver\client.py", line 360, in on_msg_received
    self.req_reply[req_id](None, {'params': []})
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\languageserver\plugin.py", line 302, in receive_response
    self.COMPLETION_CLIENT_NAME, req_id, response)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\plugin.py", line 120, in receive_response
    self._maybe_send_locked(req_id)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\plugin.py", line 161, in _maybe_send_locked
    send()
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\plugin.py", line 143, in send
    self.gather_and_send(request_responses)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\completion\plugin.py", line 212, in gather_and_send
    response_instance.handle_response(req_type, responses)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\editor\widgets\codeeditor.py", line 940, in handle_response
    handler(params)
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\editor\widgets\codeeditor.py", line 1308, in handle_hover_response
    self.log_lsp_handle_errors("Error when processing hover")
  File "C:\Users\990112578\Anaconda3\lib\site-packages\spyder\plugins\editor\widgets\codeeditor.py", line 971, in log_lsp_handle_errors
    logger.error('%', 1, stack_info=True)
Message: '%'
Arguments: (1,)

Versions

  • Spyder version: 4.0.1
  • Python version: 3.7.6
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies

atomicwrites >=1.2.0         :  1.3.0 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
cloudpickle >=0.5.0          :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
IPython >=4.0                :  7.12.0 (OK)
jedi =0.14.1                 :  0.14.1 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
numpydoc >=0.6.0             :  0.9.2 (OK)
pexpect >=4.4.0              :  4.8.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
psutil >=0.3                 :  5.6.7 (OK)
pygments >=2.0               :  2.5.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.7 (OK)
zmq >=17                     :  18.1.1 (OK)
qdarkstyle >=2.7             :  2.8 (OK)
qtawesome >=0.5.7            :  0.6.1 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
rtree >=0.8.3                :  0.9.3 (OK)
sphinx >=0.6.6               :  2.4.0 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
watchdog                     :  None (OK)
cython >=0.21                :  0.29.15 (OK)
matplotlib >=2.0.0           :  3.1.3 (OK)
numpy >=1.7                  :  1.18.1 (OK)
pandas >=0.13.1              :  1.0.1 (OK)
scipy >=0.17.0               :  1.4.1 (OK)
sympy >=0.7.3                :  1.5.1 (OK)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

Yes I created my environment using 3.7 this time instead of 3.6, no other changes, and found that so far I am not getting the hover hints error in Spyder 4.1.4. That’s progress for me. Thank you.

“all our tests run in Python 3.7.”

This sure is good to know. Long ago I chose to stay at 3.6 because some of the packages I was using weren’t available yet in 3.7. It seems like it is time for me to go to 3.7 now. I will try creating my virtual environment using 3.7. If all goes well that may get me past these issues.

Thank you.

Ok, thanks @dalthviz for the confirmation. I think I know what’s happening in this case.

@dalthviz, could you check what happens if you use Python 3.6 and Spyder 4.1.3?

@ccordoba12 @DanCodigaMWRA checking with Python 3.7.6 and conda-forge packages the hover hints worked. Just in case the packages list of the testing env created are:

# packages in environment at C:\Users\Daniel\Anaconda3\envs\cforge37:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
argh                      0.26.2                py37_1001    conda-forge
astroid                   2.4.2            py37hc8dfbb8_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     19.3.0                     py_0    conda-forge
autopep8                  1.5.3              pyh9f0ad1d_0    conda-forge
babel                     2.8.0                      py_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
bcrypt                    3.1.7            py37h8055547_1    conda-forge
bleach                    3.1.5              pyh9f0ad1d_0    conda-forge
brotlipy                  0.7.0           py37h4ab8f01_1000    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py37hc8dfbb8_0    conda-forge
cffi                      1.14.0           py37ha419a9e_0    conda-forge
chardet                   3.0.4           py37hc8dfbb8_1006    conda-forge
cloudpickle               1.5.0                      py_0    conda-forge
colorama                  0.4.3                      py_0    conda-forge
cryptography              2.9.2            py37h26f1ce3_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.6.0                      py_0    conda-forge
diff-match-patch          20200713           pyh9f0ad1d_0    conda-forge
docutils                  0.16             py37hc8dfbb8_1    conda-forge
entrypoints               0.3             py37hc8dfbb8_1001    conda-forge
flake8                    3.8.3                      py_1    conda-forge
future                    0.18.2           py37hc8dfbb8_1    conda-forge
icu                       64.2                 he025d50_1    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        1.7.0            py37hc8dfbb8_0    conda-forge
importlib_metadata        1.7.0                         0    conda-forge
intervaltree              3.0.2                      py_0    conda-forge
ipykernel                 5.3.3            py37h5ca1d4c_0    conda-forge
ipython                   7.16.1           py37h43977f1_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     4.3.21           py37hc8dfbb8_1    conda-forge
jedi                      0.17.1           py37hc8dfbb8_0    conda-forge
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
jpeg                      9d                   he774522_0    conda-forge
jsonschema                3.2.0            py37hc8dfbb8_1    conda-forge
jupyter_client            6.1.6                      py_0    conda-forge
jupyter_core              4.6.3            py37hc8dfbb8_1    conda-forge
keyring                   21.2.1           py37hc8dfbb8_0    conda-forge
lazy-object-proxy         1.4.3            py37h8055547_2    conda-forge
libclang                  9.0.1           default_hf44288c_0    conda-forge
libpng                    1.6.37               hfe6a214_1    conda-forge
libsodium                 1.0.17               h2fa13f4_0    conda-forge
libspatialindex           1.9.3                he025d50_3    conda-forge
markupsafe                1.1.1            py37h8055547_1    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py37h8055547_1001    conda-forge
nbconvert                 5.6.1            py37hc8dfbb8_1    conda-forge
nbformat                  5.0.7                      py_0    conda-forge
numpydoc                  1.1.0              pyh9f0ad1d_0    conda-forge
openssl                   1.1.1g               he774522_0    conda-forge
packaging                 20.4               pyh9f0ad1d_0    conda-forge
pandoc                    2.10                 he774522_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
paramiko                  2.7.1                    py37_0    conda-forge
parso                     0.7.0              pyh9f0ad1d_0    conda-forge
pathtools                 0.1.2                      py_1    conda-forge
pexpect                   4.8.0            py37hc8dfbb8_1    conda-forge
pickleshare               0.7.5           py37hc8dfbb8_1001    conda-forge
pip                       20.1.1                     py_1    conda-forge
pluggy                    0.13.1           py37hc8dfbb8_2    conda-forge
prompt-toolkit            3.0.5                      py_1    conda-forge
psutil                    5.7.2            py37h4ab8f01_0    conda-forge
pycodestyle               2.6.0              pyh9f0ad1d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pydocstyle                5.0.2                      py_0    conda-forge
pyflakes                  2.2.0              pyh9f0ad1d_0    conda-forge
pygments                  2.6.1                      py_0    conda-forge
pylint                    2.5.3            py37hc8dfbb8_0    conda-forge
pynacl                    1.3.0           py37h2fa13f4_1001    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.12.3           py37h1834ac0_3    conda-forge
pyqt5-sip                 4.19.18                  pypi_0    pypi
pyqtchart                 5.12                     pypi_0    pypi
pyqtwebengine             5.12.1                   pypi_0    pypi
pyrsistent                0.16.0           py37h8055547_0    conda-forge
pysocks                   1.7.1            py37hc8dfbb8_1    conda-forge
python                    3.7.6           cpython_h60c2a47_6    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python-jsonrpc-server     0.3.4              pyh9f0ad1d_1    conda-forge
python-language-server    0.34.1           py37hc8dfbb8_0    conda-forge
python_abi                3.7                     1_cp37m    conda-forge
pytz                      2020.1             pyh9f0ad1d_0    conda-forge
pywin32                   227              py37hfa6e2cd_0    conda-forge
pywin32-ctypes            0.2.0           py37hc8dfbb8_1001    conda-forge
pyyaml                    5.3.1            py37h8055547_0    conda-forge
pyzmq                     19.0.1           py37h453f00a_0    conda-forge
qdarkstyle                2.8.1              pyh9f0ad1d_0    conda-forge
qt                        5.12.5               h7ef1ec2_0    conda-forge
qtawesome                 0.7.2              pyh9f0ad1d_0    conda-forge
qtconsole                 4.7.5              pyh9f0ad1d_0    conda-forge
qtpy                      1.9.0                      py_0    conda-forge
requests                  2.24.0             pyh9f0ad1d_0    conda-forge
rope                      0.17.0             pyh9f0ad1d_0    conda-forge
rtree                     0.9.4            py37h804a536_1    conda-forge
setuptools                49.2.0           py37hc8dfbb8_0    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
snowballstemmer           2.0.0                      py_0    conda-forge
sortedcontainers          2.2.2              pyh9f0ad1d_0    conda-forge
sphinx                    3.1.2                      py_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    1.0.3                      py_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.4                      py_0    conda-forge
spyder                    4.1.4            py37hc8dfbb8_0    conda-forge
spyder-kernels            1.9.2            py37hc8dfbb8_0    conda-forge
sqlite                    3.32.3               he774522_1    conda-forge
testpath                  0.4.4                      py_0    conda-forge
toml                      0.10.1             pyh9f0ad1d_0    conda-forge
tornado                   6.0.4            py37hfa6e2cd_0    conda-forge
traitlets                 4.3.3            py37hc8dfbb8_1    conda-forge
typed-ast                 1.4.1            py37hfa6e2cd_0    conda-forge
ujson                     1.35            py37h63f7a3c_1002    conda-forge
urllib3                   1.25.9                     py_0    conda-forge
vc                        14.1                 h869be7e_1    conda-forge
vs2015_runtime            14.16.27012          h30e32a0_2    conda-forge
watchdog                  0.10.3           py37hc8dfbb8_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_0    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.34.2                     py_1    conda-forge
win_inet_pton             1.1.0                    py37_0    conda-forge
wincertstore              0.2                   py37_1003    conda-forge
wrapt                     1.11.2           py37h8055547_0    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
yapf                      0.29.0                     py_0    conda-forge
zeromq                    4.3.2                ha925a31_3    conda-forge
zipp                      3.1.0                      py_0    conda-forge
zlib                      1.2.11            h2fa13f4_1006    conda-forge