wangshub / wechat_jump_game

微信《跳一跳》Python 辅助

Home Page:https://zhuanlan.zhihu.com/p/32452473

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UnicodeStreamFilter.py 文件中提示 'str' object has no attribute 'decode'

freeleefly opened this issue · comments

python 3.5.3
windows 10
Latest commit 463eaa9
Android

  1. 手动 正常运行 wechat_jump_py3.py
  2. 运行 wechat_jump_auto.py 时 目前无法正常运行,两个问题
    2.1 不能导入common中的模块 临时解决办法是在common文件夹中 添加 init.py文件,暂时解决
    2.2 但是还是不能运行 提示 :
Traceback (most recent call last):
  File "../wechat_jump_auto.py", line 43, in <module>
    adb.test_device()
  File "D:\Code\Python\wechat_jump_game-master\common\auto_adb.py", line 45, in test_device
    print('检查设备是否连接...')
  File "D:\Code\Python\wechat_jump_game-master\common\UnicodeStreamFilter.py", line 14, in write
    s = s.decode("utf-8")
AttributeError: 'str' object has no attribute 'decode'
Exception ignored in: <common.UnicodeStreamFilter.UnicodeStreamFilter object at 0x000001FDA6391908>
AttributeError: 'UnicodeStreamFilter' object has no attribute 'flush'
  出错应该是  'str' object has no attribute 'decode'   stackoverflow上也将了,str没有decode这个函数了,所以没有办法了,暂时不知道该怎么办?

@freeleefly 好的,我看看是什么问题