草庐IT

Message_Note

全部标签

message from server: “Host is not allowed to connect to this MySQL server“问题的解决办法

数据库安装完成后,默认是不能远程登陆的,只能在本地用localhost或者127.0.0.1登录访问,如果需要远程登录,则需要修改mysql设置,具体修改方式:1、本地登录mysql: [root@localhost~]$mysql-uroot-p1234562、查看数据库中mysql表中的权限设置:mysql>usemysql;ReadingtableinformationforcompletionoftableandcolumnnamesYoucanturnoffthisfeaturetogetaquickerstartupwith-ADatabasechangedmysql>select

解决selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted

用selenium爬数据的时候,明明每一步点击都加了WebDriverWait,但还是爬一会儿就显示如下错误:selenium.common.exceptions.ElementClickInterceptedException:Message:elementclickintercepted:Elementtrclass="even"onclick="onclick_shipinsp(this,'insp')">.../tr>isnotclickableatpoint(509,404).Otherelementwouldreceivetheclick:divclass="blockUIbloc

postman能访问,程序不行,报错信息:Message“:“internal error, Unacceptable header specified in request

 在开发过程中发现一个奇怪的现象,同样的ip地址postman能获取到正确的返回,程序中不行,返回的是 error":{"code":"Base.1.0.GeneralError","@Message.ExtendedInfo":{"Message":"internalerror,Unacceptableheaderspecifiedinrequest"    解决办法:最后发现是程序中没有设置请求头信息,而postman的请求头中有7项信息。     经过测试发现在程序请求头中加入关键信息httpget.setRequestHeader("Accept","*/*");最后请求成功。 

selenium.common.exceptions.SessionNotCreatedException: Message: session not created 解决办法

一、问题原因报这个错是因为当前浏览器的版本与chromedriver.exe的版本不一致了。这个时候你需要先知道自己当前浏览器的版本,然后再去下载一个chromedriver.exe的对应版就好了二、解决办法1、查看浏览器版本帮助-关于GoogleChromehttps://registry.npmmirror.com/binary.html?path=chromedriver/(浏览器版本地址)下载对应版本zip,解压把chromedriver.exe放到python文件夹下

Unrecognized SSL message, plaintext connection?

2023-03-0709:59:01.431ERROR8619---[nio-8060-exec-1]o.a.c.c.C.[.[.[/].[dispatcherServlet]:Servlet.service()forservlet[dispatcherServlet]incontextwithpath[]threwexception[Requestprocessingfailed;nestedexceptioniscn.hutool.core.io.IORuntimeException:SSLException:UnrecognizedSSLmessage,plaintextconnecti

python selenium报错:Message: javascript error: arguments[0].click is not a function

 这是selenium比较常见的报错,所以记录一下解决方法,避免总是忘记。代码示例:fromosimporttimesfromseleniumimportwebdriverfromselenium.webdriver.chrome.optionsimportOptionsfromselenium.commonimportexceptionsasselenium_eximporttimefromselenium.webdriver.commonimportby#问题部分代码:click1=wd1.find_elements_by_xpath(div1)time.sleep(1.5)wd1.exe

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument (.. info: chrome=..)

原异常:selenium.common.exceptions.InvalidArgumentException:Message:invalidargument (Sessioninfo:chrome=97.0.4692.71)"今天想偷懒,获取地址的时候将http请求给干掉了,然后调试的时候发现抛出了这个异常,这个异常的意思的,selenium常见异常无效参数异常:无效参数谷歌版本=97.0.4692.71"1.所以对于这个问题,我用2种方式去尝试,第一种是查询谷歌浏览器与chromeDriver是否匹配,发现匹配仍然报这个异常2.我将请求方式https://添加进去后,输入https://w

selenium.common.exceptions.JavascriptException: Message: javascript error: argument is not defined

代码:driver.execute_script('$(argument[0]).fadeOut().fadeIn()',le)运行报错:selenium.common.exceptions.JavascriptException:Message:javascripterror:argumentisnotdefined解决方案,修改代码:driver.execute_script('$(arguments[0]).fadeOut().fadeIn()',le)这里的改动区别就是原来是argument,这边加个s:arguments就可以了运行之后完美解决!

message:Error: app.json: 在项目根目录未找到 app.json appid: wx5259e55145bce3

报错:message:Error:app.json:在项目根目录未找到app.jsonappid:wx5259e55145bce3 原因:导入项目后project.config.json文件被微信开发者工具修改,缺少代码:“miniprogramRoot”:"./dist"解决方法:在project.config.json文件中添加一行代码: "miniprogramRoot":"./unpackage/dist/dev/mp-weixin",重新定义项目的根路径。具体路径可以找到/dist/dev/mp-weixin文件夹,大家路径可能不一样,具体按照自己的实际情况来写就好了。最后保存重新编

(Note)动态规划的基本步骤

动态规划算法依赖于以下两个性质:最优子结构:问题的最优解是由最优子问题的最优解推出的,也就是问题的最优解包含了子问题的最优解。重叠子问题:在用递归算法自顶向下解问题时,每次产生的子问题并不是总是新问题。有些子问题被反复计算多次。动态规划算法对每一个子问题只解一次,而后将其保存在一个表格中,在之后利用这些子问题的解。动态规划的基本步骤是:(1)找出最优解的性质,并且刻画其结构特征(2)递归地定义最优值(3)以自底向上的方式,将问题分解为各个小问题,一步步地计算出最优值(4)根据计算最优值时得到的信息,构造一个最优解。