Error in manage.py runningerver with Django 1.8 on windows 8.1

I started learning Django, but when I try to start a local server it doesn't work. When I give the command "runerver" I get this error, hopefully someone can help me fix this problem. I am using windows 8.1, my python version is 3.4.2 and django 1.8

C:\Users\RA\projects\projects django\mysite>python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
338, in execute_from_command_line
    utility.execute()
  File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python34\lib\site-packages\django\core\management\base.py", line 393,
 in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.
py", line 49, in execute
    super(Command, self).execute(*args, **options)
  File "C:\Python34\lib\site-packages\django\core\management\base.py", line 444,
 in execute
    output = self.handle(*args, **options)
  File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.
py", line 88, in handle
    self.run(**options)
  File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.
py", line 97, in run
    autoreload.main(self.inner_run, None, options)
  File "C:\Python34\lib\site-packages\django\utils\autoreload.py", line 325, in
main
    reloader(wrapped_main_func, args, kwargs)
  File "C:\Python34\lib\site-packages\django\utils\autoreload.py", line 296, in
python_reloader
    exit_code = restart_with_reloader()
  File "C:\Python34\lib\site-packages\django\utils\autoreload.py", line 282, in
restart_with_reloader
    exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)
UnicodeEncodeError: 'mbcs' codec can't encode characters in position 0--1: inval
id character

      

I tried adding to autoreload.py

new_environ['PATH'] =os.path.abspath(new_environ['PATH'].replace('\u202a', ''))

      

leaving the file also

def restart_with_reloader():
    while True:
        args = [sys.executable] + ['-W%s' % o for o in sys.warnoptions] + sys.argv
        if sys.platform == "win32":
            args = ['"%s"' % arg for arg in args]
        new_environ = os.environ.copy()
        new_environ["RUN_MAIN"] = 'true'
        new_environ['PATH'] =os.path.abspath(new_environ['PATH'].replace('\u202a', ''))
        exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)
        if exit_code != 3:
            return exit_code

      

but my problem is not solved, i am starting with django and python, this is the first time i use django, help me please!

+3


source to share





All Articles