# Buggy code
def __init__(self, parent):
    SpyderCompletionPlugin.__init__(self, parent)
    self.available_languages = []
    self.client = KiteClient(None)
    self.kite_process = None

    # Installation dialog
    self.installation_thread = KiteInstallationThread(self)
    self.installer = KiteInstallerDialog(parent, self.installation_thread)

    # Status widget
    statusbar = parent.statusBar()  # MainWindow status bar
    self.open_file_updated = False
    self.status_widget = KiteStatusWidget(None, statusbar, self)

    # Signals
    self.client.sig_client_started.connect(self.http_client_ready)
    self.client.sig_status_response_ready[str].connect(self.set_status)
    self.client.sig_status_response_ready[dict].connect(self.set_status)
    self.client.sig_response_ready.connect(
        functools.partial(self.sig_response_ready.emit, self.COMPLETION_CLIENT_NAME)
    )

    self.client.sig_response_ready.connect(self._kite_onboarding)
    self.client.sig_status_response_ready.connect(self._kite_onboarding)
    self.client.sig_onboarding_response_ready.connect(self._show_onboarding_file)

    self.installation_thread.sig_installation_status.connect(self.set_status)
    self.status_widget.sig_clicked.connect(self.show_installation_dialog)
    # self.main.sig_setup_finished.connect(self.mainwindow_setup_finished)

    # Config
    self.update_configuration()


# Traceback (TypeError)
File "/Users/xaf/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/completion/kite/client.py", line 173, in perform_request
self.sig_response_ready.emit(req_id, response or {})
TypeError: KiteClient.sig_response_ready[int, dict].emit(): argument 2 has unexpected type 'str'
Traceback (most recent call last):
File "/Users/xaf/opt/anaconda3/lib/python3.7/site-packages/spyder/plugins/completion/kite/client.py", line 173, in perform_request
self.sig_response_ready.emit(req_id, response or {})
TypeError: KiteClient.sig_response_ready[int, dict].emit(): argument 2 has unexpected type 'str'

# Fixed code
def __init__(self, parent):
    SpyderCompletionPlugin.__init__(self, parent)
    self.available_languages = []
    self.client = KiteClient(None)
    self.kite_process = None

    # Installation dialog
    self.installation_thread = KiteInstallationThread(self)
    self.installer = KiteInstallerDialog(parent, self.installation_thread)

    # Status widget
    statusbar = parent.statusBar()  # MainWindow status bar
    self.open_file_updated = False
    self.status_widget = KiteStatusWidget(None, statusbar, self)

    # Signals
    self.client.sig_client_started.connect(self.http_client_ready)
    self.client.sig_status_response_ready[str].connect(self.set_status)
    self.client.sig_status_response_ready[dict].connect(self.set_status)
    self.client.sig_response_ready.connect(
        functools.partial(self.sig_response_ready.emit, self.COMPLETION_CLIENT_NAME)
    )

    self.client.sig_response_ready.connect(self._kite_onboarding)
    self.client.sig_status_response_ready.connect(self._kite_onboarding)
    self.client.sig_onboarding_response_ready.connect(self._show_onboarding_file)
    self.client.sig_client_wrong_response.connect(self._wrong_response_error)

    self.installation_thread.sig_installation_status.connect(self.set_status)
    self.status_widget.sig_clicked.connect(self.show_installation_dialog)
    # self.main.sig_setup_finished.connect(self.mainwindow_setup_finished)

    # Config
    self.update_configuration()