-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 23: illegal multibyte sequence #17
Comments
检查下pytest.ini 文件是不是utf-8 |
删除pytest.ini 里面的中文注释 |
安装之后,执行run.py 报错
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 23: illegal multibyte sequence
`run.py
2022-06-18 13:17:53.411 | INFO | main::29 -
══════════════════════════════════════════
║ WEB-UI-AUTO ║
║ No one can put out the stars ! ║
══════════════════════════════════════════
2022-06-18 13:17:53.423 | INFO | public.common:run_del_report:218 - 清除测试报告中.....
Traceback (most recent call last):
File "D:\lin_space\test\hanwenlu2016web-ui\run.py", line 225, in
RunPytest.run_bebug()
File "D:\lin_space\test\hanwenlu2016web-ui\run.py", line 209, in run_bebug
pytest.main(
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init_.py", line 145, in main
config = prepareconfig(args, plugins)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init.py", line 324, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "D:\conda1\envs\uiautotest\lib\site-packages\pluggy_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "D:\conda1\envs\uiautotest\lib\site-packages\pluggy_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "D:\conda1\envs\uiautotest\lib\site-packages\pluggy_callers.py", line 55, in multicall
gen.send(outcome)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\helpconfig.py", line 102, in pytest_cmdline_parse
config: Config = outcome.get_result()
File "D:\conda1\envs\uiautotest\lib\site-packages\pluggy_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "D:\conda1\envs\uiautotest\lib\site-packages\pluggy_callers.py", line 39, in multicall
res = hook_impl.function(*args)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init.py", line 1016, in pytest_cmdline_parse
self.parse(args)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init.py", line 1304, in parse
self.preparse(args, addopts=addopts)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init.py", line 1172, in _preparse
self.initini(args)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config_init.py", line 1091, in _initini
rootpath, inipath, inicfg = determine_setup(
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config\findpaths.py", line 186, in determine_setup
rootdir, inipath, inicfg = locate_config([ancestor])
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config\findpaths.py", line 108, in locate_config
ini_config = load_config_dict_from_file(p)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config\findpaths.py", line 45, in load_config_dict_from_file
iniconfig = _parse_ini_config(filepath)
File "D:\conda1\envs\uiautotest\lib\site-packages_pytest\config\findpaths.py", line 30, in parse_ini_config
return iniconfig.IniConfig(str(path))
File "D:\conda1\envs\uiautotest\lib\site-packages\iniconfig_init.py", line 54, in init
tokens = self.parse(iter(f))
File "D:\conda1\envs\uiautotest\lib\site-packages\iniconfig_init.py", line 82, in _parse
for lineno, line in enumerate(line_iter):
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa1 in position 23: illegal multibyte sequence
Process finished with exit code 1
`
The text was updated successfully, but these errors were encountered: