A
A
Anton Khmyrov2014-04-13 20:03:43
Django
Anton Khmyrov, 2014-04-13 20:03:43

DJango - why is the server not starting?

I decided to start learning django, installed it, created a new project (via django-admin.py), when I try to start the server (manage.py runserver --noreload), it crashes with the error:
Validating models...
0 errors found
April 14, 2014 - 01:01:08
Django version 1.6.2, using settings 'testproject.settings'
Starting development server at 127.0.0.1:8000
Quit the server with CTRL-BREAK.
Traceback (most recent call last):
File "D:\workspace_aptana\testproject\manage.py", line 11, in
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management \__init__.py", line 399, in execute_from_command_line
utility.execute()
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python34\lib \site-packages\django\core\management\base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python34\lib\site-packages\django\core \management\base.py", line 285, in execute
output = self.handle(*args, **options)
File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.py ", line 79, in handle
self.run(*args, **options)
File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.py", line 90, in run
self .inner_run(*args,**options)
File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.py", line 127, in inner_run
ipv6=self.use_ipv6, threading=threading)
File "C:\Python34\lib\ site-packages\django\core\servers\basehttp.py", line 167, in run
httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6)
File "C:\Python34\lib\site-packages\django\core\servers \basehttp.py", line 109, 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 113, 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 137, in server_bind
self. server_name = socket.getfqdn(host)
File "C:\Python34\lib\socket.py", line 460, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 0: invalid continuation byte
PS tried to run via the console (windows 7) and via aptana, the path to the project without Russian letters (D:\workspace_aptana\testproject), the encoding in the aptana settings is utf-8
As I understand it, the error occurs when trying to parse an argument passed to a script.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sheknitrtch, 2014-04-13
@sheknitrtch

Apparently, in your Windows settings, the computer name contains Russian letters ( does the name begin with the letter P?)
Try the following:
1. Change the computer name according to the instructions so that it does not contain Russian letters.
2. If it doesn't help, then open the C:\Windows\System32\drivers\etc\hosts file and add the line there:
127.0.0.1 localhostBut note that you can edit the "hosts" file only as an administrator.
PS You can read a long correspondence about this bug on the official website: Issue9377 .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question