duoshuo / duoshuo-python-sdk

A Python library for using the duoshuo API
http://duoshuo.com
Apache License 2.0
87 stars 32 forks source link

python3 不能安装 #8

Closed DozenCoder closed 7 years ago

DozenCoder commented 7 years ago

执行python setup.py install 就出现UnicodeDecodeError。 这个项目是不是没人维护了?

perchouli commented 7 years ago

环境是?python 3.5.2+mac 10.12.1 没重现这个错误。

DozenCoder commented 7 years ago

@perchouli Sorry, 刚看到。我是win8.1 python3.5.1 在powershell下安装提示:

PS F:\duoshuo-python-sdk> python .\setup.py install
Traceback (most recent call last):    
  File ".\setup.py", line 8, in <module>  
    long_description=open('README.md').read(),  
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 105: illegal multibyte sequence

`

perchouli commented 7 years ago

read的时候python用了windows默认gbk编码,但文件是utf-8的。首行加上

# -*- coding: utf-8 -*-

或者把这行(L8)去掉吧,只是读取描述文件,不影响逻辑。

DozenCoder commented 7 years ago

谢谢啦,安装成功了。