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'
Anybody has an idea?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You need to include the protocol scheme:
'http://192.168.1.61:8080/api/call'
Without the http:// part, requests has no idea how to connect to the remote server.
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.
Method 2
One more reason, maybe your url include some hiden characters, such as ‘n’.
If you define your url like below, this exception will raise:
url = ''' http://google.com '''
because there are ‘n’ hide in the string. The url in fact become:
nhttp://google.comn
Method 3
Fix connection adapter matching to be most-specific first,Miscellaneous small Python 3 text encoding bugs.,.netrc no longer overrides explicit auth.,Mountable Connection Adapters
To install Requests, simply:
$ pip install requests
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0