IDNAError when trying to GET a working url
See original GitHub issueGetting some URLs cause an IDNAError, but they work just fine with curl and other url fetchers.
Expected Result
A successful request
Actual Result
idna.core.IDNAError: The label b'xn--mn8ha4uc' is not a valid A-label
The label b'xn--mn8ha4uc' is not a valid A-label
Reproduction Steps
import requests
requests.get('https://thegroovecartel.com/feed/')
System Information
$ python -m requests.help
{
"chardet": {
"version": "3.0.4"
},
"cryptography": {
"version": "2.2.2"
},
"idna": {
"version": "2.6"
},
"implementation": {
"name": "CPython",
"version": "3.6.4"
},
"platform": {
"release": "4.15.12-201.fc26.x86_64",
"system": "Linux"
},
"pyOpenSSL": {
"openssl_version": "1010008f",
"version": "17.5.0"
},
"requests": {
"version": "2.18.4"
},
"system_ssl": {
"version": "1010007f"
},
"urllib3": {
"version": "1.22"
},
"using_pyopenssl": true
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
IDNAError when trying to GET a working url #4569 - GitHub
Getting some URLs cause an IDNAError, but they work just fine with curl and other url fetchers. Expected Result A successful request Actual ......
Read more >Crawl non-latin domain with scrapy - python - Stack Overflow
When dealing with Internationalized Domain Names (IDN) you need to encode non-ascii urls with idna . You will need to decode resulting bytes ......
Read more >Python Examples of idna.IDNAError - ProgramCreek.com
This page shows Python examples of idna.IDNAError.
Read more >URL - Android Developers
A URL may have appended to it a "fragment", also known as a "ref" or a "reference". ... of URLStreamHandler , then the...
Read more >How to authenticate to Jira REST API - Atlassian Community
Solved: I am using Jenkinsfile to update the Build result to one of the field using Curl command. Am using HTTP Basic auth....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Emojis are not valid in domain names… Really this is pyopenssl’s fault, it should squash the error since it isn’t relevant (invalid subjectAltName that doesn’t match the domain we’re fetching anyway).
They’re correct. This is firmly in
urllib3
in it’surllib3.contrib.pyopenssl
module that uses pyOpenSSL. That’s clear in the stack trace.