#6 UnicodeDecodeError to open README file

Zavřený
otevřeno před 9 roky uživatelem ovruni · 5 komentářů

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 okomentoval před 9 roky
Vlastník

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 :)
ovruni znovuotevřel před 9 roky
Omar Vega Ramos okomentoval před 9 roky
Autor

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 okomentoval před 9 roky
Vlastník

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 okomentoval před 9 roky
Autor

I'm using python-3.5.1

I'm using python-3.5.1
drymer okomentoval před 9 roky
Vlastník

Thanks. Fixed in #1444f1c68b

Thanks. Fixed in [#1444f1c68b](https://notabug.org/drymer/gnusrss/commit/1444f1c68b3a3ace4614216648e7608eec7f1d84)
Přihlaste se pro zapojení do konverzace.
Bez štítku
bug
Bez milníku
Bez zpracovatele
2 účastníků
Načítání...
Zrušit
Uložit
Není zde žádný obsah.