报错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 ...
随机推荐
- nor flash之频率限制
背景 支持一款nor flash时,出于性能考虑,一般会查看其nor支持的最高频率以及主控端spi控制器的最高频率,以选择一个合适的运行频率. 对于一款主控支持多款flash的情况,还得考虑好兼容性等 ...
- ML基础——搜索引擎与图书管理,百度与李彦宏
本文始发于个人公众号:TechFlow 谈及机器学习,大家想必会有许多联想,比如最近火热的人工智能,再比如战胜李世石的AlphaGo,甚至还会有人联想起骇客帝国或者是机械公敌等经典机器人电影. 但实际 ...
- js中时间戳转换成xxxx-xx-xx xx:xx:xx类型日期格式的做法
1.十三位数字的时间戳转换方法 var time = new Date(datetime).toLocaleString().replace(/年|月/g, "-").replac ...
- ELK学习实验001:Elastic Stack简介
1 背景介绍 在我们日常生活中,我们经常需要回顾以前发生的一些事情:或者,当出现了一些问题的时候,可以从某些地方去查找原因,寻找发生问题的痕迹.无可避免需要用到文字的.图像的等等不同形式的记录.用计算 ...
- $CF938G\ Shortest\ Path\ Queries$ 线段树分治+线性基
正解:线段树分治+线性基 解题报告: 传送门$QwQ$ 考虑如果只有操作3,就这题嘛$QwQ$ 欧克然后现在考虑加上了操作一操作二 于是就线段树分治鸭 首先线段树叶子节点是询问嘛这个不用说$QwQ$. ...
- Python3 虚拟开发环境搭建
虚拟环境的搭建 优点 1.使不同应用开发环境相互独立 2.环境升级不影响其他应用,也不会影响全局的python环境 3.防止出现包管理混乱及包版本冲突 windows 安装 # 建议使用pip3安装到 ...
- Ural1057. Amount of Degrees 题解 数位DP
题目链接: (请自行百度进Ural然后查看题号为1057的那道题目囧~) 题目大意: Create a code to determine the amount of integers, lying ...
- 03_input type="number" 输入允许小数点后两位
<input type="number" min="0" max="100" step="0.01"/> & ...
- 常用加密算法-Delphi XE 10.3.3
主要用到 DELPHI XE 10.2新增HASH函数 class function TUtils.GetStringMD5(const AInPut: string): string; begin ...
- 最新idea注册激活(永久使用,亲测可用)
IDEA破解 一.2018版本 首先下载此破解jar包:破解jar包,将其放到合适的文件夹(首选IDEA的同级目录)进行管理: 进入IDEA的根目录,打开bin文件夹中的idea.exe.vmopti ...