Encoding with 'idna' codec failed (UnicodeError: label empty or too long)

I don’t see anything wrong in this file, but these entries for “unchecky” lead me to believe you’ve got some software installed that is interfering with normal DNS resolution.

You can try uncommenting these lines. Traditionally, the hosts file is checked before DNS.

# 127.0.0.1 localhost
# ::1 localhost

If that doesn’t work, I don’t know what else you can do locally.

Thank you, i did that, but the problem is still present.
Could you please tell me more about that software, i mean i can search for it and uninstall or change or something, just would like to know what to look for.

And when you say “I don’t know what else you can do locally”, do you mean that this should work when i upload the project online? Like, the error is locally on my pc, and that is causing this issue?

Thank you very much

Side question: Is your computer part of a Windows Active Directory domain?

You might also try changing these lines in your hosts file from:

to:

127.0.0.1 localhost localhost.localdomain
::1 localhost  localhost.localdomain

I can’t tell you what to look for, because I don’t have any specific examples.

Yes, this error is local on your PC. Either something is misconfigured on your system (but I don’t know what that might be), or you have some software installed that is interfering with normal DNS resolution.

That depends. If you’re deploying to something like a linux server, it should work fine - unless it’s also misconfigured in the same way (if that’s the issue here). Or, if you’re going to deploy to another Windows system, if that system also has the same software installed, it may also display the same behavior.

Since I really don’t know what’s going on here, I can only guess.

To be clear, this is not a Django issue. The socket.getfqdn function is a standard Python library function - you would get this same invalid response from any Python code using it.

Thank you for all your help.

This is really frustrating. The laptop is new, i guess no special programs are installed that should cause this error to appear…

Anyhow i typed set user to cms and i saw this info:

set user
USERDOMAIN=DESKTOP-2OGR8E0
USERDOMAIN_ROAMINGPROFILE=DESKTOP-2OGR8E0
USERNAME=Dell
USERPROFILE=C:\Users\Dell

Is that what you meant?

Should i try to upload to Vultr or Digital Ocean and test if it works?

I was just following a tutorial. Everything up until now is working, i get no bugs, i mean i do but those are the mistakes i make while creating something, but this is really stopping me from going forward, i don’t know what to do :confused:

I am grateful for your time and trying to help!

Somewhere i read that the problem may be in that length, if it is longer that 64 characters or something like that, and somebody have mentioned that idna file…it was like a month ago, don’t really remember…

The error is being caused by whatever is causing the Python socket.getfqdn function to return this value:

Notice how the name being returned has three consecutive periods in it. That makes it an invalid name.

I don’t know what might be causing that function to return that value, I’ve never seen this happen before except when I intentionally set it up that way.

Thank you. Okay so my friend did all the setup for windows and whatnot…maybe he entered that ‘DESKTOP-2OGR8E0…home’ name…

Should i reinstall windows with default options or can you please recommend the approach to not have those 3 dots, what should be the output for socket.getfqdn()?

Normally you only define the host name - the first part of that, which would be DESKTOP-2OGR8E0. The domain name (everything after the first period) is usually assigned by your ISP when you connect to the internet. For example, the domain assigned to this laptop I’m using right now is hsd1.pa.comcast.net. That means that the output from the getfqdn function on this laptop is ASUS_1.hsd1.pa.comcast.net.

If your laptop were connected to my network, I would expect to see DESKTOP-2OGR8E0.hsd1.pa.comcast.net.

So without knowing more about the network you’re connected to, it’s going to be tough to figure this out - and I don’t even know what to tell you to look at.

Most importantly, there’s a chance that reinstalling windows isn’t going to make any difference at all if it’s your network configuration causing this.

Okay…so now i tried to access my phone wifi via hotspot, and everthing seems to be working. Both email verification and password reset. So the problem is in the wifi router.

You helped me a lot, if weren’t for you, i would not have any idea to try to access mobile internet…should i ask the isp provider (have in mind it is the same one, same operator) why does it add those 3 dots and can i remove them?

Anyhow, thank you very much again :slight_smile:

It can’t hurt to ask. However, based upon my personal experiences with most residential ISPs, I would have the opinion that it’s unlikely you are going to get an adaquate answer.