Python 请求 - 没有连接适配器 [英] Python Requests - No connection adapters

查看:54
本文介绍了Python 请求 - 没有连接适配器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Requests: HTTP for Humans 库,我得到了这个奇怪的错误,我不知道是什么意思.

I'm using the Requests: HTTP for Humans library and I got this weird error and I don't know what is mean.

No connection adapters were found for '192.168.1.61:8080/api/call'

有人有想法吗?

推荐答案

你需要包含协议方案:

'http://192.168.1.61:8080/api/call'

没有 http:// 部分,requests 不知道如何连接到远程服务器.

Without the http:// part, requests has no idea how to connect to the remote server.

注意协议方案必须全小写;例如,如果您的 URL 以 HTTP:// 开头,它也不会找到 http:// 连接适配器.

Note that the protocol scheme must be all lowercase; if your URL starts with HTTP:// for example, it won’t find the http:// connection adapter either.

这篇关于Python 请求 - 没有连接适配器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆