#6 UnicodeDecodeError to open README file

已关闭
ovruni9 年之前创建 · 5 条评论

Hi, gnurss generates the following error when installing:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 582: ordinal not in range(128)

Add "encoding='utf-8'" to open the README file in setup.py.

long_description=open('README', encoding='utf-8').read(),

Hi, gnurss generates the following error when installing: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 582: ordinal not in range(128) Add "encoding='utf-8'" to open the README file in setup.py. ```` long_description=open('README', encoding='utf-8').read(),````
drymer 评论于 9 年之前
所有者

I believe you used python2 to open it. This is a python3 package, which by default uses utf-8 encoding, that's why is not specified. If not, I'll investigate, since it gives no error to me.

PD: I think you are the parabola packager of my program, thanks for doing that :)

I believe you used python2 to open it. This is a python3 package, which by default uses utf-8 encoding, that's why is not specified. If not, I'll investigate, since it gives no error to me. PD: I think you are the parabola packager of my program, thanks for doing that :)
drymer9 年之前 关闭
ovruni9 年之前 重新开启
Omar Vega Ramos 评论于 9 年之前
发布者

I'm using python3 to open. In python3 if encoding is not specified the encoding used is platform dependent (whatever locale.getpreferredencoding() returns).

You can also check: http://www.diveintopython3.net/files.html

PD: Yes, I'm a Parabola hacker. Your program was uploaded as python-gnusrss

I'm using python3 to open. In python3 if encoding is not specified the encoding used is [platform dependent](https://docs.python.org/3/library/functions.html#open) (whatever [locale.getpreferredencoding()](https://docs.python.org/3/library/locale.html#locale.getpreferredencoding) returns). You can also check: [http://www.diveintopython3.net/files.html](http://www.diveintopython3.net/files.html) PD: Yes, I'm a Parabola hacker. Your program was uploaded as [python-gnusrss](https://www.parabola.nu/packages/pcr/any/python-gnusrss/)
drymer 评论于 9 年之前
所有者

I see. I read the pep-3120 and thought it was something general. Do you use the 3.4.4 version or higher? I'm just curious, I'll change it as you said to avoid problems.

I see. I read the [pep-3120](https://www.python.org/dev/peps/pep-3120/) and thought it was something general. Do you use the 3.4.4 version or higher? I'm just curious, I'll change it as you said to avoid problems.
Omar Vega Ramos 评论于 9 年之前
发布者

I'm using python-3.5.1

I'm using python-3.5.1
drymer 评论于 9 年之前
所有者

Thanks. Fixed in #1444f1c68b

Thanks. Fixed in [#1444f1c68b](https://notabug.org/drymer/gnusrss/commit/1444f1c68b3a3ace4614216648e7608eec7f1d84)
drymer9 年之前 关闭
登录 并参与到对话中。
未选择标签
bug
未选择里程碑
未指派成员
2 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。