报错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 ...
随机推荐
- axure公式的使用和局部变量简介
什么时候有公式?当前面是值的时候后面都可以用公式 公式怎么用?1.公式里直接写入字符串 2.变量([变量])加上字符串 3.[[]]里面运算 外面字符串 两个中括号里的变量就可以计算或者显示默认值而不 ...
- DOCKER学习_005:Flannel网络配置
一 简介 Flannel是一种基于overlay网络的跨主机容器网络解决方案,也就是将TCP数据包封装在另一种网络包里面进行路由转发和通信, Flannel是CoreOS开发,专门用于docker多机 ...
- 机器学习之路--Pandas
Pandas 是对numpy的封装 Pandas 核心结构DataFrame 近似看出矩阵结构panda字符型叫object dataframe其中一行或者一列叫series dataframe 里面 ...
- ASCII、UNICODE、UTF
在计算机中,一个字节对应8位,每位可以用0或1表示,因此一个字节可以表示256种情况. ascii 美国人用了一个字节中的后7位来表达他们常用的字符,最高位一直是0,这便是ascii码. 因此asci ...
- 【tf.keras】AdamW: Adam with Weight decay
论文 Decoupled Weight Decay Regularization 中提到,Adam 在使用时,L2 与 weight decay 并不等价,并提出了 AdamW,在神经网络需要正则项时 ...
- Unity_Dungeonize 随机生成迷宫
本文对随机生成迷宫的实现思路进行记录,其作用在于为游戏过程提供随机性以及节省开发周期,下面是Dungeonize的结构 随机迷宫的生成主要包括几个阶段 1.生成房间体结构,为墙体,自定义房间,自定义物 ...
- wannafly 27 D 巧妙求取约数
链接:https://www.nowcoder.com/acm/contest/215/D来源:牛客网 题目描述 “我不知道你在说什么,因为我只是个pupil.”--绿魔法师 一个空的可重集合S. n ...
- ntelliJ IDEA添加注释常用的快捷键
IDEA可以使用快捷键添加行注释Ctrl+/.块注释Ctrl+Shift+/,还可以快速生成类注释.方法注释等,下面就介绍这几种快捷键的用法
- 《C# 爬虫 破境之道》:第一境 爬虫原理 — 第六节:第一境尾声
在第一境中,我们主要了解了爬虫的一些基本原理,说原理也行,说基础知识也罢,结果就是已经知道一个小爬虫是如何诞生的了~那么现在,请默默回想一下,在第一境中,您都掌握了哪些内容?哪些还比较模糊?如果还有什 ...
- 《企业IT架构转型之道:阿里巴巴中台战略思想与架构实战》-总结
一.什么是业务中台 概念来自于阿里,介于前台和后台(此后台指的是云计算.数据库.消息队列.缓存等基础服务) 采用共享式架构设计解决以往烟囱式架构设计的资源浪费.重复造轮.试错成本高的问题 阿里的中 ...