刚开始学习,使用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的更多相关文章

  1. Uiautomator--出现报错“urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054,''>>”的解决方式!

    在运行uiautomator时,出现报错"urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054, ...

  2. nginx 报错 upstream timed out (110: Connection timed out)解决方案【转】

    转自 nginx 报错 upstream timed out (110: Connection timed out)解决方案 - 为程序员服务http://outofmemory.cn/code-sn ...

  3. centos6.5环境wget报错Unable to establish SSL connection

    centos6.5环境wget报错Unable to establish SSL connection [root@centossz008 src]# wget --no-check-certific ...

  4. 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 ...

  5. python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool

    报错信息 Traceback (most recent call last): File "<stdin>", line 1, in <module> Fi ...

  6. 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 ...

  7. 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 ...

  8. 使用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 ...

  9. 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 ...

随机推荐

  1. Linux: 在某个路径及其子目录下查找所有包含“hello abcserver”字符串的文件。

    find /etc -name “*” | xargs grep “hello abcserver” 在 / 及其子目录下查找所有包含UNEXPECTED_SCHEMA find /  -name * ...

  2. 基于jquery的带事件显示功能的日历板插件calendar.js

    项目中需要用到一个日历板控件,要求能显示事件,于是想到了一年前在app项目上写的一个粗略版日历板,然后又想着这个可能以后还会用 于是我就封装了一下,能满足基本要求,如果有需要更多功能的也可以自行修改源 ...

  3. CentOS 下 jenkins 安装

    前置条件 jdk 和 maven 都配置好的环境,不赘述. 下载安装文件 选择一个 rpm 包 http://pkg.jenkins-ci.org/redhat/ 完成后执行命令 sudo rpm - ...

  4. Eclipse和Tomcat的版本问题---已解决

    Eclipse和Tomcat的版本问题---已解决 这篇文章主要是解决版本匹配的问题 我的电脑上装的是jdk10,如图: Tomcat装的是9: 接着配置好环境变量,直接上图: 然后启功Tomcat, ...

  5. 性能数据的准备-Jmeter

    性能测试的一般流程: 收集性能需求——>编写性能脚本——>执行性能测试——>分析测试报告——>系统性能调优 在收集性能需求后,我们会思考: 负载测试时并发时需要多少数据?例:登 ...

  6. RAID阵列

    • 廉价冗余磁盘阵列– Redundant Arrays of Inexpensive Disks– 通过硬件/软件技术,将多个较小/低速的磁盘整合成一个大磁盘– 阵列的价值:提升I/O效率.硬件级别 ...

  7. Web漏洞总结: OWASP Top 10

    本文原创,更多内容可以参考: Java 全栈知识体系.如需转载请说明原处. 开发安全 - OWASP Top 10 在学习安全需要总体了解安全趋势和常见的Web漏洞,首推了解OWASP,因为它代表着业 ...

  8. phpcms2008安装时mysql出错

  9. windebug(转载别人的节选)

    问题一:WinDBG分X86和X64两个版本 如果你用的是32位的WinDBG,那直接打开就行:你如果用的是64位的版本,那么如果调试64位代码也直接打开,如果调试x86的代码,要使用Wow64下的W ...

  10. 【FAR 方云研发绩效】助力于解决管理难题

    方云研发绩效(farcloud.com)自发布以来,助力多家企业完成研发管理数字化转型,并有效解决产研绩效这一普遍存在的管理难题. 研发管理是许多企业面临的管理难题,首先,技术构成的信息壁垒,让内部沟 ...