报错requests.exceptions.InvalidSchema: No connection adapters were found for
刚开始学习,使用requests时,敲了点demo
import requests
params = {
"name": "name",
"password": "高宇博"
}
res = requests.get("127.0.0.1:8000", params=params)
结果出现错误
C:\Users\gaoyu\Envs\py_path1\Scripts\python.exe D:/python3.6/spider/demo/requests_test.py
Traceback (most recent call last):
File "D:/python3.6/spider/demo/requests_test.py", line 8, in <module>
res = requests.get("127.0.0.1:8000", params=params)
File "C:\Users\gaoyu\Envs\py_path1\lib\site-packages\requests\api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\gaoyu\Envs\py_path1\lib\site-packages\requests\api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\gaoyu\Envs\py_path1\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\gaoyu\Envs\py_path1\lib\site-packages\requests\sessions.py", line 640, in send
adapter = self.get_adapter(url=request.url)
File "C:\Users\gaoyu\Envs\py_path1\lib\site-packages\requests\sessions.py", line 731, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for '127.0.0.1:8000'
最后发现原因很简单,就是因为url前面需要加http://
报错requests.exceptions.InvalidSchema: No connection adapters were found for的更多相关文章
- Uiautomator--出现报错“urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054,''>>”的解决方式!
在运行uiautomator时,出现报错"urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054, ...
- nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】
转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...
- centos6.5环境wget报错Unable to establish SSL connection
centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...
- jpa报错 Unable to acquire a connection from driver [null], user [null] and URL [null]
jpa报错 Unable to acquire a connection from driver [null], user [null] and URL [null] 为啥报错 因为你在persist ...
- python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool
报错信息 Traceback (most recent call last): File "<stdin>", line 1, in <module> Fi ...
- ssh启动报错:org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
ssh项目启动报错: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection t ...
- mysqldump导出报错"mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `file_storage` at row: 29"
今天mysql备份的crontab自动运行的时候,出现了报警,报警内容如下 mysqldump: Error 2013: Lost connection to MySQL server during ...
- 使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be esta
在Eclipse中使用springboot整合Mybatis,连接到5.7版本Mysql报错WARN: Establishing SSL connection without server's ide ...
- xdebug 一直报错 upstream timed out (110: Connection timed out) while reading response header from upstream
本地主机(Windows环境192.168.66.1)访问虚拟机(192.168.66.139)里面的搭建的php环境(系统centos6.5版本,php版本是5.5.30 ,xdebug 2.4.0 ...
随机推荐
- NI LabVIEW 编程规范
LabVIEW程序编写应该遵循哪些规范? 遵循这些规范有什么好处? 具体细节是什么? 针对上面三个问题一一解答: 一.LabVIEW程序编写应该遵循哪些规范? (1)前面板.后面板控件整齐,尽可能在一 ...
- appium+ios+macaca自动化测试环境部署
环境准备(供参考) mac v10.14.4 xcode v10.2 python v3.6 确保上述环境已满足,即可开始搭建appium+ios测试环境 1 jdk安装 下载mac版本的jdk并安装 ...
- ELK学习实验009:安装kibana的仪表盘
一 metricbeat仪表盘 1.1 安装metricbeat仪表盘 可以将metricbeat数据在kibana中展示 [root@node4 ~]# cd /usr/local/metricbe ...
- 洛谷$P4503\ [CTSC2014]$企鹅$QQ$ 哈希
正解:哈希 解题报告: 传送门$QwQ$ 直接$O(len)$枚举哪一位,然后把这一位删了重新拼接起来,存桶里查下就成 $over$? 主要的难点大概在卡哈希+卡常$QAQ$ #include< ...
- IntelliJ IDEA的常用设置及快捷键
IntelliJ IDEA的常用设置及快捷键 基本设置 打开设置:ctrl+alt+s 修改主题.字体.字号 快捷键设置 创建项目和模块 标记源码文件 标记资源文件 设置jdk版本号 配置Tomcat ...
- 网络爬虫简单介绍(python)
一.简介 爬虫就是利用代码大量的将网页前端代码下载下来使用的一种程序,一般来说常见的目的为下: 1.商业分析使用:很多大数据公司都会从利用爬虫来进行数据分析与处理,比如说要了解广州当地二手房的均价走势 ...
- Java线程池学习总结
一 使用线程池的好处 池化技术相比大家已经屡见不鲜了,线程池.数据库连接池.Http 连接池等等都是对这个思想的应用.池化技术的思想主要是为了减少每次获取资源的消耗,提高对资源的利用率. 线程池提供了 ...
- spring boot的application配置文件
上次我们已经对这个文件见过面了,并且对他进行了一些简单的配置.它有两种配置方式,一个是application.properties,一个是application.yml文件,需要记住,当两个文件都 ...
- PTC热敏电阻的应用
PTC热敏电阻应用举例 PTC热敏电阻可用于计算机及其外部设备.移动电话.电池组.远程通讯和网络装备.变压器.工业控制设备.汽车及其它电子产品中,作为开关类的PTC陶瓷元件,具有开发功能.使电器设 ...
- lucene&tantivy对比
写入对比每个路径下都只能有一个IndexWriter负责写入,通过writer.lock实现.不同:lucene可以多个线程共享一个IndexWriter,每个线程负责写一个segment,从addD ...