草庐IT

execute_script

全部标签

selenium 报错 DeprecationWarning: executable_path has been deprecated, please pass in a Service object

DeprecationWarning:executable_pathhasbeendeprecated,pleasepassinaServiceobjectdriver=webdriver.Chrome(executable_path='chromedriver.exe')出现DeprecationWarning警告的类型错误:该类型的警告大多属于版本已经更新,所使用的方法过时。查询当前版本重构后的函数,是之前的executable_path被重构到了Service函数里尝试解决方法:fromseleniumimportwebdriverfromselenium.webdriver.chrom

postman的Pre-request Script获取请求体参数

一、请求体为rawvarenv=pm.environment.get("ENV")varstr_requestBody=pm.request.body.raw//获取请求体中的数据,字典varjson_requestBody=JSON.parse(str_requestBody)//把请求参数转成JSONvarmobile_no=json_requestBody.requestBody.mobile_noconsole.log("请求手机号:",mobile_no)二、请求体为x-www-form-urlencodedvaruserno=pm.request.body.urlencoded.g

已解决:sqlalchemy.exc.ObjectNotExecutableError: Not an executable object‘......’的报错问题

问题场景:在flask框架中连接数据库,并测试数据库是否连接成功使用了mysql数据库和pymysql驱动问题描述inexecute  raiseexc.ObjectNotExecutableError(statement)fromerr  sqlalchemy.exc.ObjectNotExecutableError:Notanexecutableobject:'select1'这是错误的相关代码,在conn.execute()方法处抛出了错误db=SQLAlchemy(app)withapp.app_context():withdb.engine.connect()asconn:resul

【解决】may missing <script lang=“ts“> / “allowJs“: true / jsconfig.json.volarView Problem

本人不是专业前端选手哈,空闲之余浅浅尝试一下新出的vue3,顺便记录一下搭建途中遇到的小问题Virtualscriptnotfound,maymissing/"allowJs":true/jsconfig.json.volarViewProblem(⌥F8)现象:不影响正常运行,但是提示错误信息错误信息如上所示其实已经有了答案,按照提示添加即可。"allowJs":true添加完成后保存,check报错点done

【经验总结】keil报错:declaration may not appear after executable statement in block···

问题原因:今天在keil平台上移植一段STM32代码,编译的时候一直出现报错,找了半天也找不到原因,最后通过百度通过大佬们的博文找到了原因,因为每个keil工程的STM32标准库和MDK环境设置不同,具体错误如下:解决办法:解决办法有两种。第一种方法:将所有变量声明提到最上面部分,包括结构体,即定义变量不能在执行语句之后改变以后如下:第二种方法:打开上面工具栏小锤子点击C/C++按钮,勾选C99mode选项,因为这个版本兼容所有代码格式点击OK,配置完成。这样就没有报错啦。

SpringBoot——单元测试error: can not execute. because can not find cache of TableInfo for entity!

问题  单元测试时,遇到以下报错:com.baomidou.mybatisplus.core.exceptions.MybatisPlusException:error:cannotexecute.becausecannotfindcacheofTableInfoforentity! atcom.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:49) atcom.baomidou.mybatisplus.core.toolkit.Assert.isTrue(Assert.java:38) atco

TypeError: Failed to execute ‘createObjectURL‘ on ‘URL‘: Overload resolution failed

//request.jsservice.interceptors.response.use((response)=>{constres=response.data//下载文件if(!res.code){returnresponse}...},(error)=>{ ...}exportfunctiondownloadQrcode(params){returnrequest({url:'/multiplayer-draw/download-qrcode',method:'get',//headers:{'Content-Type':'image/png;charset=UTF-8'},respon

postman中使用formdata数据获取参数编写pre-request Script获取参数自动生成sign

postman中header部分变量利用脚本生成相应的数据timestamp:通过脚本获取生成的变量sign:通过脚本获取生成的变量body中的参数是form-data格式:所有的参数需要根据实际的接口参数填写  程序片段:由于本人的接口的加密方式是入参的参数按照字母排序然后加密字符串,所以程序如下:vart=newDate().getTime();pm.collectionVariables.set("timestamp",t);console.log(pm.collectionVariables.get("timestamp"))//程序中对应的加密文本varappSecret='sbcc

Unity 解决 Reload Scripts Assemblies 每次运行都出现

问题ReloadScriptsAssemblies进度条在每次点Play按钮运行时都出现,而且时间很长,即使空项目也要十秒左右,严重影响效率我的Unity版本是2021.3.2f1c1,环境是Win1021H2解决办法在Unity中,进入Edit->ProjectSettings->Editor勾选EnterPlayModeOptions如果ReloadDomain勾选,则取消勾选参考资料https://stackoverflow.com/questions/72112300/reload-scripts-assemblies-busy-for-long-time-unity-freezes

pycharm报错提示:无法加载文件\venv\Scripts\activate.ps1,因为在此系统上禁止运行脚本。

在pycharm终端出现报错:无法加载文件\venv\Scripts\activate.ps1,因为在此系统上禁止运行脚本。解决办法1.终端输入get-executionpolicy,回车返回Restricted。 2.复制WindowsPowershall在windows以管理员的身份运行,命令窗口输入set-executionpolicyremotesigned,回车,输入Y。 3.pycharm终端写入get-executionpolicy命令回车,返回remotesigned。 4.输入可执行文件.\venv\Scripts\activate.ps1回车,没有报错,问题解决。