I couldn\'t find this exitcode anywhere but hopefully one of you could help me or let me know if this is a bug in python/Django.
Anyway, first here\'s the stacktrace
In my case it had nothing to do with PATH
, there seem to be CHROME_RESTART
environment setting with some non-english characters. Poping it from new_environ
did the trick:
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'
# This will prevent UnicodeEncodeError
new_environ.pop("CHROME_RESTART", None)
exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ)
if exit_code != 3:
return exit_code