Answer the question
In order to leave comments, you need to log in
Why do I get a UnicodeEncodeError when I try to start the Django server from under a virtual environment?
Running manage.py runserver in virtualenv results in this:
Traceback (most recent call last):
File "C:\Users\Антон\Documents\Python\projects\mysite\manage.py", line 22, in <module> execute_from_command_line(sys.argv)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line utility.execute()
File "c:\program files (x86)\python\lib\site-packages\django\core\management\__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\base.py", line 294, in run_from_argv self.execute(*args, **cmd_options)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\commands\runserver.py", line 58, in execute super(Command, self).execute(*args, **options)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\base.py", line 345, in execute output = self.handle(*args, **options)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\commands\runserver.py", line 97, in handle self.run(**options)
File "c:\program files (x86)\python\lib\site-packages\django\core\management\commands\runserver.py", line 106, in run autoreload.main(self.inner_run, None, options)
File "c:\program files (x86)\python\lib\site-packages\django\utils\autoreload.py", line 333, in main reloader(wrapped_main_func, args, kwargs)
File "c:\program files (x86)\python\lib\site-packages\django\utils\autoreload.py", line 304, in python_reloader exit_code = restart_with_reloader()
File "c:\program files (x86)\python\lib\site-packages\django\utils\autoreload.py", line 290, 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: invalid character
Answer the question
In order to leave comments, you need to log in
C:\Users\Anton\
remove Cyrillic from path
Remove Cyrillic from PC name
or
Do not use Windows / not posix OS
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question