作者x94fujo6 ()
看板EZsoft
标题[情报] streamlink UnicodeDecodeError
时间Tue Dec 24 20:08:38 2019
新系统架环境时发现的白痴问题
错误
Traceback (most recent call last):
File "runpy.py", line 193, in _run_module_as_main
File "runpy.py", line 85, in _run_code
File "*\Streamlink\bin\streamlink.exe\__main__.py", line 18, in
<module>
File "*\Streamlink\pkgs\streamlink_cli\main.py", line 1005, in main
setup_config_args(parser)
File "*\Streamlink\pkgs\streamlink_cli\main.py", line 704, in
setup_config_args
setup_args(parser, config_files)
File "*\Streamlink\pkgs\streamlink_cli\main.py", line 673, in
setup_args
args, unknown = parser.parse_known_args(arglist)
File "argparse.py", line 1766, in parse_known_args
File "argparse.py", line 1778, in _parse_known_args
File "argparse.py", line 2035, in _read_args_from_files
UnicodeDecodeError: 'cp932' codec can't decode byte 0xef in position 0:
illegal multibyte sequence
意思是程式用到的某个档案开头有奇怪的东西无法解码
原因是设定档被存成带BOM的UTF-8
win+R执行
%appdata%\streamlink
用文字编辑器打开streamlinkrc
另存新档
无档头/无BOM/无签章 的 UTF-8
覆盖掉streamlinkrc
注意
某些编辑器会自动加上.txt副档名 要删掉
记事本要选择 所有档案 (*.*) 才不会加上副档名
然後streamlink就可以正常使用了
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.33.176.49 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/EZsoft/M.1577189321.A.F68.html
※ 编辑: x94fujo6 (114.33.176.49 台湾), 12/24/2019 20:27:50