diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 82203de5..9e92bc62 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -890,7 +890,13 @@ def shutdown(restart=False, update=False): if '--nolaunch' not in args: args += ['--nolaunch'] logger.info('Restarting PlexPy with %s', args) - os.execv(exe, args) + + # os.execv fails with spaced names on Windows + # https://bugs.python.org/issue19066 + if os.name == 'nt': + subprocess.Popen(args, cwd=os.getcwd()) + else: + os.execv(exe, args) os._exit(0)