Spyder ipython控制台错误:无法解码路径

时间:2019-02-18 21:53:33

标签: python ipython spyder

我的问题是,当我启动Spyder时,出现以下错误:

Traceback (most recent call last):
File "C:\Anaconda2\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1544, in create_kernel_manager_and_kernel_client
config=None, autorestart=True)
File "C:\Anaconda2\lib\site‑packages\traitlets\config\configurable.py", line 73, in __init__
super(Configurable, self).__init__(**kwargs)
File "C:\Anaconda2\lib\site‑packages\traitlets\traitlets.py", line 997, in __init__
setattr(self, key, value)
File "C:\Anaconda2\lib\site‑packages\traitlets\traitlets.py", line 585, in __set__
self.set(obj, value)
File "C:\Anaconda2\lib\site‑packages\traitlets\traitlets.py", line 559, in set
new_value = self._validate(obj, value)
File "C:\Anaconda2\lib\site‑packages\traitlets\traitlets.py", line 591, in _validate
value = self.validate(obj, value)
File "C:\Anaconda2\lib\site‑packages\traitlets\traitlets.py", line 2053, in validate
raise TraitError(msg.format(value, self.name, class_of(obj)))
TraitError: Could not decode 'C:\\Users\\Jos\xe9 Miguel\\AppData\\Roaming\\jupyter\\runtime\\kernel�f89b82d15.json' for unicode trait 'connection_file' of a QtKernelManager instance.

我试图将Anaconda2安装在仅包含Unicode字符(特别是C:\Anaconda2\)的路径中,但是这两个都不起作用。 我希望有一个人可以帮助我。谢谢您的回复。

1 个答案:

答案 0 :(得分:1)

(此处为 Spyder维护程序),您可以通过以下两种方法来解决此问题:

  1. 将您的用户主目录(即C:\\Users\\Jos\xe9 Miguel)重命名为没有Unicode字符也没有空格的内容(例如C:\\Users\\Jose
  2. 创建一个没有Unicode字符也没有空格的Windows用户,并在那里安装Anaconda。