# Buggy code
def handle_hover_response(self, contents):
    """Handle hover response."""
    if running_under_pytest():
        try:
            from unittest.mock import Mock
        except ImportError:
            from mock import Mock  # Python 2

        # On some tests this is returning a Mock
        if isinstance(contents, Mock):
            return

    try:
        content = contents["params"]

        if running_under_pytest():
            # On some tests this is returning a list
            if isinstance(content, list):
                return

        self.sig_display_object_info.emit(content, self._request_hover_clicked)
        if content is not None and self._show_hint and self._last_point:
            # This is located in spyder/widgets/mixins.py
            word = self._last_hover_word
            content = content.replace("\xa0", " ")
            self.show_hint(content, inspect_word=word, at_point=self._last_point)
            self._last_point = None
    except RuntimeError:
        # This is triggered when a codeeditor instance was removed
        # before the response can be processed.
        return
    except Exception:
        self.log_lsp_handle_errors("Error when processing hover")


# Traceback (TypeError)
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,)

# Fixed code
def handle_hover_response(self, contents):
    """Handle hover response."""
    if running_under_pytest():
        try:
            from unittest.mock import Mock
        except ImportError:
            from mock import Mock  # Python 2

        # On some tests this is returning a Mock
        if isinstance(contents, Mock):
            return

    try:
        content = contents["params"]

        if isinstance(content, list):
            # Prevent sporious errors when a client return a list
            return

        self.sig_display_object_info.emit(content, self._request_hover_clicked)
        if content is not None and self._show_hint and self._last_point:
            # This is located in spyder/widgets/mixins.py
            word = self._last_hover_word
            content = content.replace("\xa0", " ")
            self.show_hint(content, inspect_word=word, at_point=self._last_point)
            self._last_point = None
    except RuntimeError:
        # This is triggered when a codeeditor instance was removed
        # before the response can be processed.
        return
    except Exception:
        self.log_lsp_handle_errors("Error when processing hover")