gpt4 book ai didi

anaconda-navigator 不会启动并出现 UnicodeDecodeError

转载 作者:行者123 更新时间:2023-12-02 03:28:34 25 4
gpt4 key购买 nike

问题描述:

重新启动后,命令 $ anaconda-navigator 将不再启动 Anaconda Navigator。

而是生成以下跟踪堆栈:

Traceback (most recent call last):
File "/home/penguin/anaconda3/bin/anaconda-navigator", line 11, in <module>
sys.exit(main())
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/app/main.py", line 99, in main
from anaconda_navigator.utils.logs import clean_logs
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/utils/logs.py", line 18, in <module>
from anaconda_navigator.config import (LOG_FILENAME, LOG_FOLDER,
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/__init__.py", line 27, in <module>
from anaconda_navigator.config.main import CONF
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/main.py", line 67, in <module>
raw_mode=True,
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/user.py", line 221, in __init__
self.load_from_ini()
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/user.py", line 279, in load_from_ini
self.read(self.filename(), encoding='utf-8')
File "/home/penguin/anaconda3/lib/python3.6/configparser.py", line 697, in read
self._read(fp, filename)
File "/home/penguin/anaconda3/lib/python3.6/configparser.py", line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File "/home/penguin/anaconda3/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 3: invalid continuation byte

尝试进行故障排除

首先,我尝试过:

source ~/anaconda3/bin/activate root
anaconda-navigator

基于评论: https://github.com/ContinuumIO/anaconda-issues/issues/1580

接下来,我尝试过:

$ anaconda-navigator --reset 

但是这会导致:

Anaconda Navigator 配置重置...

Traceback (most recent call last):
File "/home/penguin/anaconda3/bin/anaconda-navigator", line 11, in <module>
sys.exit(main())
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/app/main.py", line 75, in main
from anaconda_navigator.config import CONF_PATH
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/__init__.py", line 27, in <module>
from anaconda_navigator.config.main import CONF
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/main.py", line 67, in <module>
raw_mode=True,
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/user.py", line 221, in __init__
self.load_from_ini()
File "/home/penguin/anaconda3/lib/python3.6/site-packages/anaconda_navigator/config/user.py", line 279, in load_from_ini
self.read(self.filename(), encoding='utf-8')
File "/home/penguin/anaconda3/lib/python3.6/configparser.py", line 697, in read
self._read(fp, filename)
File "/home/penguin/anaconda3/lib/python3.6/configparser.py", line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File "/home/penguin/anaconda3/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 3: invalid continuation byte

最佳答案

疑难解答

首先,尝试重置导航器。

$ anaconda-navigator --reset

上述命令应删除 ~/.anaconda 中损坏的日志文件,但如果这不起作用或导致错误,请尝试手动删除日志文件。

$ rm -rf /home/$USER/.anaconda

最后,如果这不起作用,请尝试:

$ conda install anaconda-clean
$ conda-clean --yes

引用

@goanpeca 和 @jeethjoseph 的评论:https://github.com/ContinuumIO/anaconda-issues/issues/7256

关于anaconda-navigator 不会启动并出现 UnicodeDecodeError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52504360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com