Z
Z
zagogulka2015-07-29 11:03:41
Django
zagogulka, 2015-07-29 11:03:41

Why does django throw the following errors when running any project?

Unhandled exception in thread started by .wrapper at 0x03721420>
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args , **kwargs)
File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.py", line 139, in inner_run
ipv6=self.use_ipv6, threading=threading)
File "C: \Python34\lib\site-packages\django\core\servers\basehttp.py", line 191, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Python34\lib\site-packages\ django\core\servers\basehttp.py", line 76, in __init__
super(WSGIServer, self).__init__(*args, **kwargs)
File "C:\Python34\lib\socketserver.py", line 430, in __init__
self.server_bind()
File "C:\Python34\lib\site-packages\django\core\servers\basehttp.py", line 80 , in server_bind
super(WSGIServer, self).server_bind()
File "C:\Python34\lib\wsgiref\simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "C:\Python34\lib\http \server.py", line 135, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Python34\lib\socket.py", line 463, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 4: invalid continuation byte

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
asd111, 2015-07-29
@zagogulka

Your username is most likely in Russian or the computer name. Therefore, the user folder is in Russian and most likely django is installed globally.
You need to install django in virtualenv in a folder in English, not globally. Then the username in Russian will not affect.
The computer name is changed through the control panel > system > advanced system settings > computer name.

G
GavriKos, 2015-07-29
@GavriKos

The main error is:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 4: invalid continuation byte
Your encoding is either wrong or the character is not valid, for example Russian comments.

S
sim3x, 2015-07-29
@sim3x

Cyrillic on Windows crap PC
name
User
name Launch directory name
...
I always did not understand why people use Windows - there are no ideas yet other than masochism

Z
zagogulka, 2015-07-29
@zagogulka

Thank you dear friends! The solution to the problem was suggested to me by asd111! Due to several hard rebuds in the system, "-PC" was assigned to the Latin name of the computer (xs like)! After removing that from the name, everything fell into place!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question