## TypeError: required field “posonlyargs“ missing from arguments

环境

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 可安装的程序,进行安装后,解决的此问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值