'gbk' codec can't decode byte 0xad in position 7564: illegal multibyte sequence
Closed this issue · 5 comments
yiz24 commented
yiz24 commented
yiz24 commented
hyugogirubato commented
@yiz24
If you can try to play with reading the function code because this is a text codec problem that I cannot reproduce at home. If you find a solution to overcome this codec problem, do not hesitate to submit it!
szescxz commented
Caused by
- using Windows with ANSI code page set to
cp936
- value of some props, likely the mobile operator name (
gsm.operator.alpha
), contains Chinese characters
Solvable by adding encoding='utf-8'
to every subprocess.getoutput
call. Although I'd prefer to use subprocess.run('adb whatever', capture_output=True).stdout
and match the bytestring.
Too lazy to submit a PR, sorry.
hyugogirubato commented