1
votes

I am using python 3.5 and windows 10, but had the same issue using windows 8, and that is the traceback i get while trying to runserver:

Traceback (most recent call last): File "C:\Users\noabendor87\documents\otree\manage.py", line 10, in execute_from_command_line(sys.argv, script_file=file) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\otree\management\cli.py", line 177, in execute_from_command_line utility.execute() File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management__init__ .py", line 346, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management\base.py" , line 394, in run_from_argv self.execute(*args, **cmd_options) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management\commands \runserver.py", line 49, in execute super(Command, self).execute(*args, **options) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management\base.py" , line 445, in execute output = self.handle(*args, **options) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management\commands \runserver.py", line 88, in handle self.run(**options) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\core\management\commands \runserver.py", line 97, in run autoreload.main(self.inner_run, None, options) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\utils\autoreload.py", li ne 336, in main reloader(wrapped_main_func, args, kwargs) File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\utils\autoreload.py", li ne 307, in python_reloader exit_code = restart_with_reloader() File "c:\users\noabendor87\appdata\local\programs\python\python35-32\lib\site-packages\django\utils\autoreload.py", li ne 293, 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

I have already tried following the instructions in the following link: http://stackoverflow.com/questions/25714826/error-in-manage-py-runserver-with-django-on-windows-8-1

but it did not help.

This is how the lines of code look like:

enter image description here

(Since Im a new user I cannot paste the image to the original post)

Anyone have encountered something similar and have a solution?

1
Don't use images for showing code. Post your actual code.mugabits

1 Answers

0
votes

I used to have similar problems because of the difficulties with the virtual environment in windows 10. Try running the powershell as an administrator and do "Set-ExecutionPolicy RemoteSigned" or "Set-ExecutionPolicy Unrestricted" if remotesigned does not work. Do this before activating the virtualenv.