Upgrade to 17.1 from 17.0 problem:UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 50: ordinal not in range(128)
最近 gentoo 从 17.0 更新到 17.1, 需要手动进行升级配置,使用 unsymlink-lib -p --finish 这一步的时候报错,报错如下:
/usr/lib/python-exec/python3.6/unsymlink-lib -p --finish
...
rm -d /usr/lib64/go/test/fixedbugs/issue5957.dir/c.go
rm -d /usr/lib64/go/test/fixedbugs/issue5957.dir/b.go
rm -d /usr/lib64/go/test/fixedbugs/issue5957.dir/a.go
rm -d /usr/lib64/go/test/fixedbugs/bug437.dir/one.go
rm -d /usr/lib64/go/test/fixedbugs/bug437.dir/x.go
rm -d /usr/lib64/go/test/fixedbugs/bug437.dir/two.go
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.6/unsymlink-lib", line 819, in <module>
main()
File "/usr/lib/python-exec/python3.6/unsymlink-lib", line 782, in main
m.finish(pretend=args.pretend, resume=args.action.endswith('resume'))
File "/usr/lib/python-exec/python3.6/unsymlink-lib", line 585, in finish
out('rm -d {}', fp)
File "/usr/lib/python-exec/python3.6/unsymlink-lib", line 41, in out
_log(template, *args, **kwargs)
File "/usr/lib/python-exec/python3.6/unsymlink-lib", line 30, in _log
**kwargs
UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 50: ordinal not in range(128)
我的 unsymlink-lib 的版本是 15,前面的一些 bug 已经修复了,所以检查 locale 的结果,结果发现是 locale 的问题, locale 都是 "POSIX",通过修改 /etc/env.d/02locale,
LANG="en_US.UTF-8"
LC_COLLATE="C"
然后 env-update && source /etc/profile,就解决问题了。
Upgrade to 17.1 from 17.0 problem:UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 50: ordinal not in range(128)的更多相关文章
- 解决python3读写中文txt时UnicodeDecodeError : 'ascii' codec can't decode byte 0xc4 in position 5595: ordinal not in range(128) on line 0的问题
今天使用python3读写含有中文的txt时突然报了如下错误,系统是MAC OS,iDE是pycharm: UnicodeDecodeError : 'ascii' codec can't decod ...
- python 写入日志的问题 UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position 0: illegal multibyte sequence
最近,使用python的logging模块,因为这个写入日志写完后就没有管它.在存储日志信息的时候,一直提示: UnicodeEncodeError: 'gbk' codec can't encode ...
- UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u8888′ in position 0: ordinal not in range(168)
python保存文件UnicodeEncodeError以及reload(sys)后print失效问题 在将字符串写入文件时,执行f.write(str),后台总是报错:UnicodeEncodeEr ...
- 【Python】解决UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 0: ordinal not in range(128)
指定文件字符集为utf-8 在文件头部加入以下代码: import sys reload(sys) sys.setdefaultencoding('utf-8')
- UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position 0: illegal multibyte sequence
使用Python写文件的时候,或者将网络数据流写入到本地文件的时候,大部分情况下会遇到:UnicodeEncodeError: 'gbk' codec can't encode character ' ...
- 关于编码问题,报错:'gbk' codec can't encode character '\u3164' in position 0: illegal multibyte sequence
之前经常在写入文件的时候遇到这种报错, 'gbk' codec can't encode character '\u3164' in position 0: illegal multibyte seq ...
- 数据库连接 UnicodeEncodeError: 'latin-1' codec can't encode character u'\u4eac' in position 0: ordinal not in range(256),UnicodeEncodeError: 'latin-1' codec can't encode character
处理方法就是,设置连接和游标的charset为你所希望的编码,如utf8, 连接数据库的时候加上 charset="utf8 db = MySQLdb.connect(host= '14 ...
- Windows下使用pip安装python包是报错-UnicodeDecodeError: 'ascii' codec can't decode byte 0xcb in position 0
先交待下开发环境: 操作系统:Windows 7 Python版本:2.7.9 Pip版本:6.1.1 其他环境忽略 在windows下使用pip下载python包,出现如下错误 Collecting ...
- python2.7 报错(UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128))
报错: 原来用的python3.5版本后来改为2.7出现了这个错误里面的中文无法显示 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 ...
随机推荐
- WinCC V7.5安装过程截图
- 2017 北京网络赛 E Cats and Fish
Cats and Fish 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are many homeless cats in PKU campus. They ...
- Maven是什么,如何使用Maven
一.简单的小问题? 1.1.假如你正在Eclipse下开发两个Java项目,姑且把它们称为A.B,其中A项目中的一些功能依赖于B项目中的某些类,那么如何维系这种依赖关系的呢? 很简单,这不就是跟我们之 ...
- [转载]@Component 和 @Bean 的区别
@Component 和 @Bean 的区别 @Component 和 @Bean 的区别 Spring帮助我们管理Bean分为两个部分,一个是注册Bean,一个装配Bean. 完成这两个动作有三种方 ...
- Linux分发版本的试用及选择工具
https://www.forbes.com/sites/jasonevangelho/2019/06/15/how-to-test-drive-200-linux-distributions-wit ...
- [Codeforces]1263C Everyone is a Winner!
题目 On the well-known testing system MathForces, a draw of nnn rating units is arranged. The rating w ...
- Day4 - H - Following Orders POJ - 1270
Order is an important concept in mathematics and in computer science. For example, Zorn's Lemma stat ...
- 小程序之scroll-view用法 - 水平滚动
<scroll-view class="box" scroll-x="true" > <view class="box-item&q ...
- 二、JavaScript之点击按钮改变HTML样式 (CSS)
一.代码如下 二.点击前 三.点击后 <!DOCTYPE html> <html> <meta http-equiv="Content-Type" c ...
- js利用递归生成随机数填充到数组
用递归算法实现,数组长度为5且元素的随机数在2-32间不重复的值 var array = new Array(5); function addNumToArray(array,num){ i ...