requirements.txt 文件编码出现问题
Opened this issue · 2 comments
Ataidawa commented
安装依赖时不管是 python3 install_requirements.py
还是 pip install -r requirements.txt
都报异常。
Message='gbk' codec can't decode byte 0xae in position 17: illegal multibyte sequence
Source=D:\Portable Files\Unpack Android Rom\unpackandroidrom\install_requirements.py
StackTrace:
File "D:\Portable Files\Unpack Android Rom\unpackandroidrom\install_requirements.py", line 8, in <module> (Current frame)
for i in f:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 17: illegal multibyte sequence
提示 requirements.txt
文件编码异常,通过排查后发现
if i[0] == '#':
pass
这种判断方式是不可用的,会影响文件编码 也就是前面报的GBK异常,推荐大佬尝试一下这个判断方式
if not line or line.startswith('#'): # 忽略空行和注释
continue
Ataidawa commented
老师,OPPO部分完全就废了,我把OPPO那个函数删掉程序才跑得起来……
Ataidawa commented
另外引导安装的库有点点小问题,把requests.txt改成下面这样就可以了
ConfigParser
protobuf==3.20.0
brotli
pycryptodome
docopt
Crypto
zstandard
google
lz4
glob2