IDNA does not work both ways
The error "IDNA does not access there" means that the module receives a different result when decoding and encoding the string.
After examining the source code for the IDNA Python module, the "IDNA does not access there" error is raised on line 139 if the module cannot recreate the input. In the decoding function, the input is separated by dots and each part is converted to
. There the text is decoded, but before the result is returned, it encodes the result and compares it to the input and raises an error if it is not the same: "this is not a circular motion" or
encode(decode(text)) != text
In the error message, you will also get the two lines you tried to compare, in the first example:
UnicodeError: ('IDNA does not round-trip', 'xn--grohandel-shop-2fb', 'grosshandel-shop')
You get the error because it converted
to "großhandel-shop" on
to "grosshandel-shop". The symbol
was added to
-tld at the end of 2010 , so this is a bug. Before the change
had to be changed to
Your second example is probably corrupted because it converts to: "đsottĤmqĐqǗoĔ ⢠5"
source to share