报错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 ...
随机推荐
- Object 与 Function那神奇而混乱的搞基关系
// Object 与 Function神奇而混乱的搞基关系... Object.__proto__ === Function.prototype; // true Object.__proto__ ...
- kotlin + springboot启用elasticsearch搜索
参考自: http://how2j.cn/k/search-engine/search-engine-springboot/1791.html?p=78908 工具版本: elasticsearch ...
- 【题解】P2521 [HAOI2011]防线修建(动态凸包)
[题解]P2521 [HAOI2011]防线修建(动态凸包) 凸包是易插入不好删除的东西,按照剧情所以我们时光倒流 然后问题就是维护凸包的周长,支持加入 本来很简单,但是计算几何就是一些小地方经验不足 ...
- 洛谷$P1712\ [NOI2016]$区间 线段树
正解:线段树 解题报告: 传送门$QwQ$ $umm$很久以前做的了来补个题解$QwQ$ 考虑给每个区间按权值($r-l$从大往小排序,依次加入,然后考虑如果有一个位置被覆盖次数等于$m$了就可以把权 ...
- python中的enumerate、map、filter和zip函数
引入 python内置了很多可以供我们直接调用的函数,这些函数的效率往往都非常高.我们在自己造轮子的同时,也非常有必要了解并且正确使用python给我们提供的大量的内置函数.在前面的博客里面我已经介绍 ...
- 记: Spring Data Jpa @OneToMany 级联查询被动触发的问题
I have encountered a bug in using Spring Data Jpa. Specifically,when @OneToMany was used to maintain ...
- 《图解机器学习-杉山将著》读书笔记---CH1
CH1 什么是机器学习 重点提炼 机器学习的种类: 常分为:监督学习.无监督学习.强化学习等 监督学习是学生从老师那获得知识,老师提供对错指示 无监督学习是在没有老师的情况下,学生自习 强化学习是在没 ...
- Spring 加定时器
定时器功能我们一般不常用, 但是一旦用到,那也是非常重要的, 今天我们就讲一下如何简单快速的使用定时器 第一种方法, 使用注解的方式完成定时器 1.在spring-servlet.xml文件中加入ta ...
- ENS 域名注册表智能合约(ENSRegistry.sol)解析
ENS 注册表合约是 ENS 系统中的核心合约,了解这个合约可以敲开我们理解 ENS 域名系统的大门. 打开下面的折叠区域可以查看用 Solidity 语言编写的详细代码.当前部署在以太坊中的 ENS ...
- 深度学习论文翻译解析(七):Support Vector Method for Novelty Detection
论文标题:Support Vector Method for Novelty Detection 论文作者:Bernhard Scholkopf, Robert Williamson, Alex Sm ...