在Windows 10上使用Django 1.8.8的runserver出错

时间:2016-04-21 14:49:08

标签: python django windows-10

我正在使用python 3.5和Windows 10,但使用Windows 8时遇到了同样的问题,这是我在尝试运行服务器时得到的回溯:

Traceback (most recent call last):
File "C:\Users\noabendor87\documents\otree\manage.py", line 10, in <module>
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", line 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", line 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", line 293, in restart_with_reloader
exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)

代码是

286>def restart_with_reloader():
287>while True:
288>    args = [sys.executable] + ['-W%s' % o for o in sys.warnoptions] + sys.argv
289>    if sys.platform == "win32":
290>        args = ['"%s"' % arg for arg in args]
291>    new_environ = os.environ.copy()
292>    new_environ["RUN_MAIN"] = 'true'
293>    exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)
294>    if exit_code != 3:
295>        return exit_code

我尝试过以下链接中提到的所有内容: Error in manage.py runserver with Django on windows 8.1

但那里提供的解决方案并没有解决问题。

任何人都可以分享一些见解吗?

0 个答案:

没有答案