报错aiohttp.client_exceptions.ClientProxyConnectionError: Cannot connect to host 117.57.90.155:9999 ssl:default [Connect call failed ('117.57.90.155', 9999)]

使用aiohttp进行异步请求时,尝试设置代理IP,老是报错
图片说明

它说只支持HTTP,那好,我就用HTTP

图片说明

然后又说需要验证,按网上说的避免验证

async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False)) as session:

图片说明

依然报错,

DeprecationWarning: verify_ssl is deprecated, use ssl=False instead
  async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False)) as session:

什么wan

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
django、subprocess多进程 报错django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
在django程序中,使用了subprocess多进程,代码如下。 ``` #开始启动进程去处理业务 使用跨平台的多进程库subprocess PYTHON = sys.executable shell_cmd = '"%s" -m supportchannel.wechat_servers.wechatProcess %s' % (PYTHON, userKey) #let servers be a package cmd = shlex.split(shell_cmd) try: child = subprocess.Popen(args=cmd, shell=False) ``` 程序在运行的时候报错django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. 感觉是subprocess的多进程无法和djangoapp通讯,求解决方法。
pyspider写入数据库报错 MySQLdb._exceptions.OperationalError: (2006, '')
问题背景: 因为要将爬取的内容写入到数据库,所以在navicat内创建了新的数据表, 并设置好字段。在pyspider的调试页面的时候数据可以正常写入到mysql内。 但是已在pyspider的webui页面点击running后就会报错。 调试页面的代码: try: cursor = self.db.cursor() #data= sql = "insert into zpxx(jobtitle,Jobnature, workplace,Experiences,major,lan,wages,ProfessionalTitle,Number,dates,renzhiyaoqiu,companyjianjie,companysize,companyxingzhi,companytel,companyurl,companyemail) values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')"%(title,Nature,Place,exp,major,Lan,wages,Zc,num,date,Req,company_profile,company_size,company_nature,tel,url,email) cursor.execute(sql) cursor.close() self.db.commit() self.db.close() except Exception as e: print (e) self.db.rollback() 只放了写入数据库部分的代码。 在调试页面的时候一切正常,而且数据库也有信息。 但是一运行就会报错: (2006, '') [E 190417 08:57:22 base_handler:203] (2006, '') Traceback (most recent call last): File "c:\py36_virtualenv\lib\site-packages\pyspider\libs\base_handler.py", line 196, in run_task result = self._run_task(task, response) File "c:\py36_virtualenv\lib\site-packages\pyspider\libs\base_handler.py", line 176, in _run_task return self._run_func(function, response, task) File "c:\py36_virtualenv\lib\site-packages\pyspider\libs\base_handler.py", line 155, in _run_func ret = function(*arguments[:len(args) - 1]) File "<1>", line 63, in detail_page File "c:\py36_virtualenv\lib\site-packages\MySQLdb\cursors.py", line 183, in execute while self.nextset(): File "c:\py36_virtualenv\lib\site-packages\MySQLdb\cursors.py", line 136, in nextset nr = db.next_result() MySQLdb._exceptions.OperationalError: (2006, '') 上网查了很多,要么是说最大写入数不对等等,可是试了都没有用 求指教
用 driver.find_element_by_link_text('退出').click()异常
问题: python+seleniu做自动化用 driver.find_element_by_link_text('退出').click()做qq邮箱退出操作程序异常,求大神解答一下哪里有问题! 异常情况如下: File "D:/PycharmProjects/untitled/mainTest.py", line 13, in <module> login().user_logout(driver) File "D:\PycharmProjects\untitled\LoginPublic.py", line 24, in user_logout driver.find_element_by_link_text('退出').click() File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 282, in find_element_by_link_text return self.find_element(by=By.LINK_TEXT, value=link_text) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 712, in find_element {'using': by, 'value': value})['value'] File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 201, in execute self.error_handler.check_response(response) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException Process finished with exit code 1 ![图片说明](https://img-ask.csdn.net/upload/201604/12/1460468206_925355.png)
selenium.common.exceptions.ElementClickInterceptedException解决办法
目标是定位提交元素,并点击,定位元素时,写的Xpath,可以精确指向元素,但无法定位 ![图片说明](https://img-ask.csdn.net/upload/201903/27/1553679098_701249.jpg) 1、原本的代码是 driver.find_element_by_xpath("html/body/div[12]/div[2]/div[1]/div[1]/div[3]/div[1]/button[2]/span").click() 报错信息如下: File "D:\Program Files\python\lib\site-packages\selenium-3.13.0-py3.7.egg\selenium\webdriver\remote\webelement.py", line 628, in _execute return self._parent.execute(command, params) File "D:\Program Files\python\lib\site-packages\selenium-3.13.0-py3.7.egg\selenium\webdriver\remote\webdriver.py", line 320, in execute self.error_handler.check_response(response) File "D:\Program Files\python\lib\site-packages\selenium-3.13.0-py3.7.egg\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: Element <span> is not clickable at point (1174,526) because another element <li class="ivu-dropdown-item"> obscures it 改成如下代码后即可定位并点击成功: tijiao=driver.find_element_by_xpath("html/body/div[12]/div[2]/div[1]/div[1]/div[3]/div[1]/button[2]/span") driver.execute_script("arguments[0].click();",tijiao)
linux执行jar包报Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'root' (using password: YES)错误
我用idea创建一个spring boot项目本地执行application可以运行程序。 但是项目打成jar包后放入linux中用 java -jar执行报错,报错情况如下: [ERROR] 2019-09-28 13:10:36,293 method:com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1846) create connection error java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:897) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:447) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1375) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1431) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1844) Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'root' (using password: YES) at sun.reflect.GeneratedConstructorAccessor34.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:129) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:795) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:720) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:688) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:130) at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:540) at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202) at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1348) at com.mysql.cj.NativeSession.connect(NativeSession.java:163) at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:841) ... 7 more [ERROR] 2019-09-28 13:10:40,298 method:com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1846) create connection error java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:897) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:822) at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:447) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1375) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1431) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1844) Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'root' (using password: YES) at sun.reflect.GeneratedConstructorAccessor34.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:129) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:795) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:720) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:688) at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:130) at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:540) at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202) at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1348) at com.mysql.cj.NativeSession.connect(NativeSession.java:163) at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:841) ... 7 more
淘淘商城在构建mybatis逆向工程报错:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
在导入了逆向工程以后,执行java代码就出现了下面的报错。 ``` com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'performance_schema.session_variables' doesn't exist at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2819) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2768) at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1651) at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:4198) at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3592) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2311) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:347) at org.mybatis.generator.internal.db.ConnectionFactory.getConnection(ConnectionFactory.java:68) at org.mybatis.generator.config.Context.getConnection(Context.java:526) at org.mybatis.generator.config.Context.introspectTables(Context.java:436) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222) at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:133) at GeneratorSqlmap.generator(GeneratorSqlmap.java:27) at GeneratorSqlmap.main(GeneratorSqlmap.java:33) ```
sql语句报错怎么修改呀!
sql语句为什么会报错! String sql="select A.TIME,'销售出库' as XSTYPE,sum(A.NUMBER) AS NUMBER,sum(A.TOTAL) AS TOTAL," +"CASE F.PRODLEVEL WHEN '1' THEN '原厂' WHEN '2' THEN '正厂' WHEN '3' THEN '副厂' WHEN '4' THEN '品牌' WHEN '5' THEN '拆车件' END AS PRODLEVEL," +" CONCAT(I.className,'->',H.className,'->',G.className) as CLASSNAME,F.NO,F.PRODNAME,F.OENO" +"FROM " +"(select A.TIME,A.ID,'销售出库' as XSTYPE,B.NUM AS NUMBER ,B.PRICE AS D_PRICE,B.TOTAL AS TOTAL,B.PRODUCTS_ID AS P_WARES_ID,A.USER_ID,A.STORAGE_ID AS D_STORAGE,B.LOCATION_ID,A.TYPE AS P_TYPE,A.AUDIT_STATUS,A.COMPANY_ID," +" from jxc_t_outbound_info A" +" left join jxc_t_outbound_detailed B on A.ID=B.OUTBOUND_ID" +" UNION" +" select C.TIME,C.ID,'销售退货' as XSTYPE,D.NUM AS NUMBER,D.PRICE AS D_PRICE,D.NUM*D.PRICE AS TOTAL," +" D.PRODUCTS_ID AS P_WARES_ID,C.USER_ID,C.STORAGE_ID AS D_STORAGE_ID,D.LOCATION_ID,'1' AS P_TYPE,C.AUDIT_STATUS,C.COMPANY_ID" +" from jxc_t_outbound_revise C" +"left join jxc_t_outbound_revise_detailed D on C.ID=D.OUTBOUND_REVISE_ID" +") A" +" left join jxc_t_products F on A.P_WARES_ID=F.ID" +" left join jxc_t_providers C on A.USER_ID=C.ID" +" left join shopping_goodsclass G on G.ID=F.GOODSCLASS_ID" +"left join shopping_goodsclass H on H.ID=G.parent_id" +"left join shopping_goodsclass I on I.ID=H.parent_id" +" where A.P_TYPE='1' and A.AUDIT_STATUS='3'"; 报错提示:com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select A.TIME,A.ID,'销售出库' as XSTYPE,B.NUM AS NUMBER ,B.PRICE AS D_PRICE,' at line 1;怎么解决呀!
Python+Selenium定位悬停元素总是报错,什么原因呢?
#coding=utf-8 from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait import os,time driver=webdriver.Chrome() driver.get("http://192.168.0.222:8085/zfgtaiAdmin/Product/loginBackground.jsp") time.sleep(3) #driver.maximize_window() driver.find_element_by_id("username").clear() driver.find_element_by_id("username").send_keys("15112304365") driver.find_element_by_id("username").send_keys(Keys.TAB) time.sleep(4) driver.find_element_by_id("password").send_keys("System.out.print") driver.find_element_by_css_selector("input[type=\"button\"]").click() driver.find_element_by_link_text("产品管理").move_to_element("产品管理").perform() #WebDriverWait(driver,10).until(lambda the_driver) WebDriverWait(driver,10).until(lambda the_driver:the_driver.find_element_by_link_text("产品管理").is_displayed()) menu= driver.find_element_by_link_text("产品管理").find_element_by_link_text("产品发布") webdriver.ActionChains(driver).move_to_element(menu).perform() time.sleep(5) driver.quit() Traceback (most recent call last): File "E:\WorkSpace\Selenium 1\src\Test14\__init__.py", line 22, in <module> driver.find_element_by_link_text("产品管理").move_to_element("产品管理").perform() File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 317, in find_element_by_link_text return self.find_element(by=By.LINK_TEXT, value=link_text) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element 'value': value})['value'] File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute self.error_handler.check_response(response) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element (Session info: chrome=50.0.2661.102) (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86) 这是什么问题啊?
mybatis在使用foreach进行List集合查询时,出现sql映射很多问号,不是乱码,就是多了很多问号
近日,在编写Spring Mvc的时候,出现一个特别怪的事情,我正常使用 <select id="findListWithIdsString" resultType="OrderProduct" parameterType="java.util.List"> SELECT <include refid="orderProductOwnColumns"/> a.del_flag AS "delFlag" FROM tbl_order_product a <where> a.del_flag = '0' AND a.id in ('XXXXX','XXXX') </where> </select> 这个是没问题的,但是,当我改为从java传至List的时候,就出问题了,xml代码: <select id="findListWithIdsString" resultType="OrderProduct" parameterType="java.util.List"> SELECT <include refid="orderProductOwnColumns"/> a.del_flag AS "delFlag" FROM tbl_order_product a <where> a.del_flag = '0' <choose> <when test="inComingIds != null and inComingIds.size()>0"> AND a.id in <foreach collection="inComingIds" item="item" index="index" open="(" close=")" separator="," >                  #{item}              </foreach> </when> <otherwise> AND a.id='0' </otherwise> </choose> </where> </select> 然后我的前java端代码是: List<String> idList=new ArrayList<>();//传入的List String opIds=mp.getRelatedOrderProductIds();//前端获取的String Collections.addAll(idList,StringUtils.split(opIds, ","));//转化为List OrderProduct opForSearch=new OrderProduct(); opForSearch.setInComingIds(idList); orderProductService.findListWithIdsString(opForSearch); 数据库配置如下: ?useUnicode=true&characterEncoding=utf-8 出错信息: 2019-05-01 15:28:43,034 DEBUG [modules.sys.dao.OrderProductDao.findListWithIdsString] - ==> Preparing: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) 2019-05-01 15:28:43,034 DEBUG [modules.sys.dao.OrderProductDao.findListWithIdsString] - ==> Parameters: 54eca8e0409a4f5b81919ecbf7b85d44(String), 4fda20df078945aeaae3960f265795c1(String) 2019-05-01 15:28:43,094 ERROR [500.jsp] - ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ### The error may exist in D:\apache-tomcat-8.0.53-ft\webapps\blanink-web\WEB-INF\classes\mappings\modules\sys\OrderProductDao.xml ### The error may involve com.blanink.business.modules.sys.dao.OrderProductDao.findListWithIdsString-Inline ### The error occurred while setting parameters ### SQL: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flalag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ### The error may exist in D:\apache-tomcat-8.0.53-ft\webapps\blanink-web\WEB-INF\classes\mappings\modules\sys\OrderProductDao.xml ### The error may involve com.blanink.business.modules.sys.dao.OrderProductDao.findListWithIdsString-Inline ### The error occurred while setting parameters ### SQL: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flag AS "delFlag", a.del_flag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399) at com.sun.proxy.$Proxy27.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205) at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
mybatis在使用foreach进行List集合查询时,sql映射时多余问号,网上没有类似问题,求大神指教
近日,在编写Spring Mvc的时候,出现一个特别怪的事情,我正常使用 ``` <select id="findListWithIdsString" resultType="OrderProduct" parameterType="java.util.List"> SELECT <include refid="orderProductOwnColumns"/> a.del_flag AS "delFlag" FROM tbl_order_product a <where> a.del_flag = '0' AND a.id in ('XXXXX','XXXX') </where> </select> ``` 以上这个这个是** 没问题的**,但是,当我改为从java**传值List**的时候,就出问题了,xml代码: ``` <select id="findListWithIdsString" resultType="OrderProduct" parameterType="java.util.List"> SELECT <include refid="orderProductOwnColumns"/> a.del_flag AS "delFlag" FROM tbl_order_product a <where> a.del_flag = '0' <choose> <when test="inComingIds != null and inComingIds.size()>0"> AND a.id in <foreach collection="inComingIds" item="item" index="index" open="(" close=")" separator="," >                  #{item}              </foreach> </when> <otherwise> AND a.id='0' </otherwise> </choose> </where> </select> ``` 然后我的前java端代码是: ``` List<String> idList=new ArrayList<>();//传入的List String opIds=mp.getRelatedOrderProductIds();//前端获取的String Collections.addAll(idList,StringUtils.split(opIds, ","));//转化为List OrderProduct opForSearch=new OrderProduct(); opForSearch.setInComingIds(idList); orderProductService.findListWithIdsString(opForSearch); ``` 数据库配置如下: ``` ?useUnicode=true&characterEncoding=utf-8 ``` 出错信息: ``` 2019-05-01 15:28:43,034 DEBUG [modules.sys.dao.OrderProductDao.findListWithIdsString] - ==> Preparing: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) 2019-05-01 15:28:43,034 DEBUG [modules.sys.dao.OrderProductDao.findListWithIdsString] - ==> Parameters: 54eca8e0409a4f5b81919ecbf7b85d44(String), 4fda20df078945aeaae3960f265795c1(String) 2019-05-01 15:28:43,094 ERROR [500.jsp] - ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ### The error may exist in D:\apache-tomcat-8.0.53-ft\webapps\blanink-web\WEB-INF\classes\mappings\modules\sys\OrderProductDao.xml ### The error may involve com.blanink.business.modules.sys.dao.OrderProductDao.findListWithIdsString-Inline ### The error occurred while setting parameters ### SQL: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flalag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ### The error may exist in D:\apache-tomcat-8.0.53-ft\webapps\blanink-web\WEB-INF\classes\mappings\modules\sys\OrderProductDao.xml ### The error may involve com.blanink.business.modules.sys.dao.OrderProductDao.findListWithIdsString-Inline ### The error occurred while setting parameters ### SQL: SELECT a.id AS "id", a.order_id AS "order.id", a.actual_flow_id AS "actualFlowId", a.category_id AS "companyCategory.id", a.parent_order_product_id as "parentOrderProductId", a.price AS "price", a.amount AS "amount", a.product_name AS "productName", a.a_product_name AS "aProductName", a.product_description AS "productDescription", a.delivery_time AS "deliveryTime", a.rate AS "rate", a.is_a_confirm AS "isAConfirm", a.confirm_userid AS "confirmUserid", a.A_confirm_time AS "aConfirmTime", a.order_product_type AS "orderProductType", a.inner_delivery_time AS "innerDeliveryTime", a.companyB_priority AS "companyBPriority", a.companyA_priority AS "companyAPriority", a.order_product_status AS "orderProductStatus", a.product_sn AS "productSn", a.a_product_sn AS "aProductSn", a.source AS "source", a.A_company_id AS "aCompany.id", a.B_company_id AS "bCompany.id", a.take_materiel_status AS "takeMaterielStatus", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", "ORDER_PRODUCT" AS "resourceType", a.remarks AS "remarks", a.down_order_status AS "downOrderStatus", a.batch_number AS "batchNumber", a.closure AS "closure", a.closure_money AS "closureMoney", a.del_flag AS "delFlag", a.del_flag AS "delFlag" FROM tbl_order_product a WHERE a.del_flag = '0' AND a.id in ( ???????????? ??? ? ???????? ??? , ???????????? ??? ? ???????? ??? ) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??? '54eca8e0409a4f5b81919ecbf7b85d44' ???????? ??? , ?????' at line 47 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399) at com.sun.proxy.$Proxy27.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205) at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63) ```
mysql用主键查询出两条相同的记录
``` SELECT a.id, a.user_id AS userId, a.content, a.status, a.create_time AS createTime, a.address, a.type, a.people_count AS peopleCount, a.fee_content AS feeContent, a.active_time AS activeTime, a.condition, a.pic, a.join_count, c.avatars AS initiatorAvatars, c.phone AS initiatorPhone, c.name As initiatorName FROM t_active a LEFT JOIN t_join_active b ON a.id = b.active_id LEFT JOIN t_user c ON a.user_id=c.id WHERE a.id=? ``` id是主键查询出两条相同的记录。 org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2 报了这个错。 sql复制到数据库中查询,只有一条。请教是什么问题 ![图片说明](https://img-ask.csdn.net/upload/201904/17/1555503750_459867.png)
报错解决:selenium chromeOptions
报错解决:selenium.common.exceptions.WebDriverException: Message: invalid argument: unrecognized capability: chromeOptions 详情:安装selenium和谷歌驱动后,运行报错。求教怎么解决。 以下是报错信息: ``` Traceback (most recent call last): File "E:/Gordon/trackingnumber clawling1.4.py", line 88, in <module> t = Track() File "E:/Gordon/trackingnumber clawling1.4.py", line 34, in __init__ self.dr = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe") File "C:\Users\Administrator\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "C:\Users\Administrator\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 98, in __init__ self.start_session(desired_capabilities, browser_profile) File "C:\Users\Administrator\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 188, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Users\Administrator\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 256, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: invalid argument: unrecognized capability: chromeOptions ```
2019年12月6日,运行selenium报错,selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
2019年12月6日,google chrome浏览器 80.0.3970.5(正式版本),下载webdriver版本对应版本没有,然后下载了对应版本的浏览器,把驱动放在python 环境中,同时放在浏览器安装 路径,同时配置了环境变量以后运行报错!
mysql语句出现数据库出现问题
PreparedStatementCallback; bad SQL grammar [select (select name from vs_base_orga where id=(select pid from vs_base_orga where id=o.orgaid )) as orga_name ,(select name from vs_base_orga where id=o.orgaid )as depart_name,sum(t.acco_should)as acco_should,sum(t.acco_provide)as acco_provide,sum(t.acco_accumulation)as acco_accumulation,sum(t.acco_medical)as acco_medical,sum(t.acco_unemployment)as acco_unemployment,sum(t.acco_person)as acco_person,sum(t.acco_deductions)as acco_deductions,sum(t.acco_other_sub)as acco_other_sub,sum(t.acco_actual)as acco_actual,(t.acco_date)as acco_datefrom vs_base_oum o,tc_account t where t.id=o.userid'10e58a7c47624a999b400028b25b5f2f' and t.acco_date >='2015-11-01' group by orga_name,depart_name']; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'vs_base_oum o,tc_account t where t.id=o.userid'10e58a7c47624a999b400028b25b5f2f'' at line 1
Selenium无法停止加载
我想爬取某网页,该网页加载速度特别慢,所以设置超时时间强制加载 driver.set_page_load_timeout(3) try: driver.get('链接') except TimeoutException: driver.execute_script('window.stop()')#超时后停止加载 然后报错,后面的代码都无法执行了 报错信息如下 selenium.common.exceptions.TimeoutException: Message:Timeout
selenium爬取招聘网站一直刷新主页,代码为什么爬不出来,超时怎么解决?
``` from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time from selenium.common.exceptions import TimeoutException from pyquery import PyQuery as pq browser = webdriver.Firefox() wait = WebDriverWait(browser, 10) def search(): try: browser.get( 'https://www.simplyhired.com/') #网站url browser.implicitly_wait(10) input = wait.until( EC.presence_of_element_located((By.CSS_SELECTOR, "input.id_f_keywords:nth-child(1)"))#搜索框 ) submit = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, '.btn-block')))#按钮 input.send_keys("Information Management")#搜索框中输入 submit.click() get_products() browser.implicitly_wait(10) except TimeoutException: # 当网卡超时时,重新执行 return search() def next_page(): try: next_page = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'a.next-pagination')))#下一页按钮 next_page.click() except TimeoutException: # 当网卡超时时,重新执行 return search() def get_products(): wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, '#content .jobs')))#获取id为content下class为jobs的所有card js-job active html = browser.page_source print(html)#将html代码打印出来 def mian(): print("第", 1, "页:") search() for i in range(2, 20): time.sleep(3) print("第", i, "页:") get_products() if __name__ == '__main__': mian() ``` 拜托哪位大神能教教我呀,小白一个
selenium3.5下webdriver设置超时
多线程下预启动webdriver时给他们设置超时时长: this.webdriver.set_page_load_timeout(180) 结果报错如下: this.webdriver.set_page_load_timeout(180) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 807, in set_page_load_timeout 'type': 'page load'}) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 297, in execute self.error_handler.check_response(response) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: timeouts
python + Appium运行时,报错: A session is either terminated or not started 如何解决?
![图片说明](https://img-ask.csdn.net/upload/201911/30/1575119283_374195.png) # 代码如下: from appium import webdriver import time # #appium服务监听地址 server = 'http://localhost:4723/wd/hub' # localhost为本机;4723为端口(默认);/wd/hub可以看成是规定的默认地址 # #app启动参数 desired_caps = { "platformName": "Android", # platformName:使用哪个移动操作系统平台;iOS,Android或FirefoxOS # "platformVersion":"5", "deviceName": "127.0.0.1:62001", # deviceName:使用的移动设备或模拟器 "appPackage": "com.xcy.zj", # appPackage:填写包名 "appActivity": ".ui.activity.SplashActivity", # 要从包中启动的Android活动的活动名称 "newCommandTimeout" : 6000, "unicodeKeyboard" : True, "resetKeyboard" : True, "noReset": True } # #驱动 driver = webdriver.Remote(server, desired_caps) driver.implicitly_wait(10) ##点击我的 driver.find_element_by_id("com.xcy.zj:id/act_main_my_text").click() # 报错信息如下: Traceback (most recent call last): File "D:/ceshi/Pycharm/pycharm projects/init_/exercise/test20191130.py", line 19, in <module> driver.implicitly_wait(10) File "D:\ceshi\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 912, in implicitly_wait 'implicit': int(float(time_to_wait) * 1000)}) File "D:\ceshi\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "D:\ceshi\Python\lib\site-packages\appium\webdriver\errorhandler.py", line 29, in check_response raise wde File "D:\ceshi\Python\lib\site-packages\appium\webdriver\errorhandler.py", line 24, in check_response super(MobileErrorHandler, self).check_response(response) File "D:\ceshi\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidSessionIdException: Message: A session is either terminated or not started
异常:com.mysql.jdbc.exceptions.jdbc4.communicatio
异常:com.mysql.jdbc.exceptions.jdbc4.communicationException:communication link failure last packet sent to the server was 0 ms ago at sun.refect.nativecon.........等等 我用的是mysql数据库,Java文件可以编译,但是一运行就出现错误
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
相关热词 c# 二进制截断字符串 c#实现窗体设计器 c#检测是否为微信 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片
立即提问

相似问题

2
MySQL 报错 com.alibaba.druid.sql.parser.EOFParserException: EOF
2
Selenium无法停止加载
0
selenium webdriver调试报错 Message: Failed to convert data to an object?
2
Django搭建的网站登录Xadmin时报错:TemplateDoesNotExist: xadmin/views/register.html。
1
selenium爬取淘宝美食数据的问题
0
selenium.common.exceptions.ElementClickInterceptedException解决办法
0
selenium爬取招聘网站一直刷新主页,代码为什么爬不出来,超时怎么解决?
1
pyspider写入数据库报错 MySQLdb._exceptions.OperationalError: (2006, '')
4
mysql用主键查询出两条相同的记录
1
为什么用python3.5调用fdfs_client时抛出异常raise DataError(errmsg + '(uploading)')?
0
mybatis在使用foreach进行List集合查询时,出现sql映射很多问号,不是乱码,就是多了很多问号
1
mybatis在使用foreach进行List集合查询时,sql映射时多余问号,网上没有类似问题,求大神指教
0
django、subprocess多进程 报错django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
2
python连接服务器的redis 请求成功且抛出异常
2
报错解决:selenium chromeOptions
2
python+appium,sendkeys输入不了内容,无论中文还是数字怎么办?
1
使用WebDriver中的click操作无法关闭天猫弹出的登陆界面
0
pyinstaller打包处理的程序用不了
2
淘淘商城在构建mybatis逆向工程报错:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
4
linux执行jar包报Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'root' (using password: YES)错误