James Saryerwinnie added the comment:
I ran into this as well also using the embedded distribution for windows
(https://docs.python.org/3/using/windows.html#the-embeddable-package).
socket.getaddrinfo() will encode unicode hostnames using idna and trigger this
error if you call this function
New submission from Ilya Kulakov:
See this post: https://github.com/kennethreitz/requests/issues/3578
The current workaround for requests is to have a no-op import somewhere in the
code.
However, that doesn't really work for us: our python and stdlib are bundled by
pyqtdeploy as in Qt resourc