首页 > 其他分享 >QA|外部调用类方法总报错missing 1 required positional argument:'self'|UI自动化

QA|外部调用类方法总报错missing 1 required positional argument:'self'|UI自动化

时间:2023-05-31 15:23:19浏览次数:58  
标签:missing self required argument positional 报错

外部调用类方法总报错missing 1 required positional argument:'self'

 

原因:实例化这个类 实例化错了,少了括号()

解决:改成如下就可以了

 

参考学习:调用类方法时报错:missing 1 required positional argument: 'self' - hehehe_wy7 - 博客园 (cnblogs.com)

 

标签:missing,self,required,argument,positional,报错
From: https://www.cnblogs.com/T-Better/p/17446214.html

相关文章

  • [Slide] 解决Slidev export导出pdf报错
    解决Slidevexport导出pdf报错问题按照Slidev的官方文档使用导出为pdf需要安装playwright-chromium官网安装方法如下:npmi-Dplaywright-chromium在我电脑上执行安装后直接执行导出命令sudoslidevexport,显示报错如下:Slidevv0.42.1(global)theme@slidev/......
  • bitsandbytes通过源码安装后调用报错AttributeError: module 'bitsandbytes.nn' has n
    通过github下载的源码使用pipinstall-e.方式安装的时候会出现题目中的问题。这个时候先卸载掉bitsandbytes,然后重新使用pipinstallbitsandbytes安装,这种方式直接从仓库中安装,问题就解决了。目前尚不清楚问题出现原因,虽然两种方式的安装版本都是0.38.1......
  • QA|selenium在send_keys时报错dict object has no attribute ''|UI自动化测试
    Q:selenium在send_keys时报错dictobjecthasnoattribute'send_keys',如下图 增加了print(type(e1))发现确实是字典类型,怪了,按道理e1的type应该是selenium.webdriver.remote.webelement.WebElement才对,怎么会变成dict字典呢?我网上查了,按照(115条消息)Python运行selenium时......
  • 报错问题谷粒商城 Oss endpoint can‘t be empty
    报错信息:Causedby:java.lang.IllegalArgumentException:Ossendpointcan’tbeempty.网上查了一下说有两种可能第一种是springboot和springcloud版本不对应第二种错误说的是oss.yml格式错误 建议优先检查yml格式我的因为那天改配置的时候被家里猫按到了,然后没有发现,检......
  • uniapp报错集合
    1、swiper组件明明按照方法写了,却不起效果?排查发现,swiper组件宽度为0,设置swiper宽度即可2、报错Cannotreadproperty'forceUpdate'ofundefined原因为未配置小程序appid3、引用组件,明明目录里面有组件却报找不到?排查发现,引用地址正常,经过编译后在小程序中锁定的地址不正常......
  • java同步mysql的数据到PostgreSQL时报错ERROR: invalid byte sequence for encoding "
    最近,同事在做一个功能,通过java程序将mysql中的一张表的数据同步到pgsql中,在同步过程中,插入到pgsql中出现了如下错误:`###Errorupdatingdatabase.Cause:org.postgresql.util.PSQLException:ERROR:invalidbytesequenceforencoding"UTF8":0x00在位置:unnamedportalpa......
  • git提交时报错not found: commitlint
    --全局安装npminstall-g@commitlint/cli--添加配置文件commitlint.config.js到项目下module.exports={rules:{//在这里添加你的规则//例如,要求提交消息的长度不超过50个字符'header-max-length':[2,'always',50]},};......
  • 关于mysql 创建索引报错 1071 specified key was too long ;max key length is 3027
    另一种张表也是相同的字段创建索引却能成功,在网上查了一些资料。后来发现是两张表字段都用的varchar类型,不过能成功建索引的表设置的长度是50,而不能成功的表里设置的255,修改字符长度就能成功建索引了。关于varchar(50)和varchar(255)的区别:https://dba.stackexchange.com/questio......
  • go 执行ssh 报错ssh: handshake failed: read tcp xxx:->xxx:22: read: connection re
    需求:解决报错go执行ssh报错ssh:handshakefailed:readtcpxxx:->xxx:22:read:connectionresetbypeer 10个以内,没有问题。10以上就报错解决:我的远程(192.168.49.171)服务器ssh默认最大限制10解除限制,下面的操作都是在49.171上操作的。1.编辑sshd_confi......
  • npm install 安装报错 npm ERR [email protected]: Permission denied (publickey)
    错误描述PSD:\webstorm\vue-element-admin-i18n>npminstall--registry=https://registry.npm.taobao.`org```npmERR!code128npmERR!AnunknowngiterroroccurrednpmERR!commandgit--no-replace-objectsls-remotessh://[email protected]/nhn/raphael.gitn......