fffonion / Xunlei-Fastdick

迅雷快鸟 Xunlei Network Accelerator For Router
https://yooooo.us/2015/xunlei-fastdick-router
819 stars 177 forks source link

写日志时UnicodeDecodeError 报错异常 #102

Closed Coolkids closed 6 years ago

Coolkids commented 7 years ago

python版本2.1.13 系统LEDE 内核4.9 报错日志: Traceback (most recent call last): File "./swjsq.py", line 793, in ins.run(uid, pwd_md5, save = False) File "./swjsq.py", line 425, in run 'To Upgrade: %s %s %s' % ( _avail['province'], _avail['sp'], ", ".join(_to_upgrade)) File "./swjsq.py", line 198, in uprint print(s.encode('utf-8'), end = end) File "./swjsq.py", line 179, in print logfd.write(line.encode('utf-8')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 21: ordinal not in range(128)

还有个问题就是 如果上行,下行都开通了. 只会加速上行

fffonion commented 7 years ago

@Coolkids 只加速上行的问题,现在还存在吗

Coolkids commented 7 years ago

还没测试. 我现在用的其他脚本,自己魔改的版本.

fffonion commented 7 years ago

哈哈好的 On Mon, Aug 21, 2017 at 8:48 PM Coolkid notifications@github.com wrote:

还没测试. 我现在用的其他脚本,自己魔改的版本.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/fffonion/Xunlei-Fastdick/issues/102#issuecomment-323888346, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCVlVPFd74parE2P4dcokCWuuBIJdPnks5saiVTgaJpZM4Oy48X .

mmmrt commented 6 years ago

<运行环境> Python3.6 Openwrt 12(MiWifi改固件)

<警告> Warning: pycrypto not found, use pure-python implemention

<异常>

 b'Error: login xunlei failed, \xe6\x82\xa8\xe7\x9a\x84\xe5\xb8\x90\xe5\x8f\xb7\xe5\xad\x98\xe5\x9c\xa8\xe5\xbc\x82\xe5\xb8\xb8,\xe8\xaf\xb7\xe7\x99\xbb\xe5\xbd\x95\xe5\xae\x89\xe5\x85\xa8\xe4\xb8\xad\xe5\xbf\x83\xe7\xa1\xae\xe8\xae\xa4\xef\xbc\x81'
Traceback (most recent call last):
  File "swjsq/swjsq.py", line 800, in <module>
    ins.run(uid, hashlib.md5(pwd).hexdigest())
  File "swjsq/swjsq.py", line 374, in run
    print(dt)
  File "swjsq/swjsq.py", line 190, in print
    _real_print(line, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 111-118: ordinal not in range(128)

<运营商> 广州电信