环境
python:3.8.0
os:windows
错误
exec(co, module.__dict__)
File "d:\program files (x86)\appium\python\lib\site-packages\allure\pytest_plugin.py", line 9, in <module>
from allure.common import AllureImpl, StepContext
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\program files (x86)\appium\python\lib\site-packages\_pytest\assertion\rewrite.py", line 170, in exec_module
exec(co, module.__dict__)
File "d:\program files (x86)\appium\python\lib\site-packages\allure\common.py", line 19, in <module>
from allure.structure import Attach, TestStep, TestCase, TestSuite, Failure, Environment, EnvParameter
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "d:\program files (x86)\appium\python\lib\site-packages\_pytest\assertion\rewrite.py", line 170, in exec_module
exec(co, module.__dict__)
File "d:\program files (x86)\appium\python\lib\site-packages\allure\structure.py", line 14, in <module>
class Attach(xmlfied('attachment',
File "d:\program files (x86)\appium\python\lib\site-packages\allure\rules.py", line 116, in xmlfied
class MyImpl(namedlist('XMLFied', [(item[0], None) for item in items])):
File "d:\program files (x86)\appium\python\lib\site-packages\namedlist.py", line 381, in namedlist
type_dict = {'__init__': _make_fn('__init__', _nl_init, fields, defaults),
File "d:\program files (x86)\appium\python\lib\site-packages\namedlist.py", line 180, in _make_fn
code = compile(module_node, '<string>', 'exec')
TypeError: required field "posonlyargs" missing from arguments
解决方案
把python版本升级到3.8.1
去官网下载3.8.1 可安装的程序,进行安装后,解决的此问题