'https://www.coindesk.com/learn/what-is-magic-eden-how-to-get-started-on-the-nft-marketplace/ raises an error
Closed this issue · 2 comments
import validators url= 'https://www.coindesk.com/learn/what-is-magic-eden-how-to-get-started-on-the-nft-marketplace/' v =validators.url(url) print(v)
ValidationFailure(func=url, args={'reason': "encoding with 'idna' codec failed (UnicodeError: label too long)", 'value': 'https://www.coindesk.com/learn/what-is-magic-eden-how-to-get-started-on-the-nft-marketplace/'})
The url is valid, but it runs into an encoding error.
Similar error with different url:
ValidationFailure(func=url, args={'reason': "encoding with 'idna' codec failed (UnicodeError: label empty or too long)", 'value': 'https://docs.informatica.com/master-data-management/identity-resolution/10-1/release-guide/version-9-5-3/new-features-and-changes--9-5-3-hotfix-2-/new-features--9-5-3-hotfix-2-/company_name-field.html'})
Hi, please update to version 0.21.2, these have been addressed:
$ . ./.venv/bin/activate
$ python -c "from validators import __version__; print(__version__)"
0.21.2
$ python -c "from validators import url; print(url('https://www.coindesk.com/learn/what-is-magic-eden-how-to-get-started-on-the-nft-marketplace/'))"
True
$ python -c "from validators import url; print(url('https://docs.informatica.com/master-data-management/identity-resolution/10-1/release-guide/version-9-5-3/new-features-and-changes--9-5-3-hotfix-2-/new-features--9-5-3-hotfix-2-/company_name-field.html'))"
True