From 9a536fcafced9f6a74e6f706a9ce587fa4d59b0d Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 31 Dec 2021 16:50:04 +0200 Subject: [PATCH 1/2] Fix UVC app on Windows --- apps/uvc/main.py | 4 ---- apps/uvc/requirements.txt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/uvc/main.py b/apps/uvc/main.py index ab8daf3f9..291183021 100644 --- a/apps/uvc/main.py +++ b/apps/uvc/main.py @@ -4,10 +4,6 @@ import depthai as dai import time -if os.name == 'nt': - print("This app is temporarily disabled on Windows system due to an issue with USB descriptors. We are working on resolving this issue") - raise SystemExit(0) - if platform.machine() == 'aarch64': print("This app is temporarily disabled on AARCH64 systems due to an issue with stream preview. We are working on resolving this issue") raise SystemExit(0) diff --git a/apps/uvc/requirements.txt b/apps/uvc/requirements.txt index d23fd2f75..7871b916f 100644 --- a/apps/uvc/requirements.txt +++ b/apps/uvc/requirements.txt @@ -1,2 +1,2 @@ --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ -depthai==2.13.3.0.dev+b9dbc05ea35d19534678d791f8fbf03ec4b087ba +depthai==2.13.3.0.dev+f513b0f27b4f07a9940cd9dfe65d7fd6deeaf29d From 3650fc64a4eacfc664c281d2c7e5e43ec17cd508 Mon Sep 17 00:00:00 2001 From: alex-luxonis Date: Fri, 31 Dec 2021 17:21:35 +0200 Subject: [PATCH 2/2] No `os.setsid` on Windows --- depthai_helpers/app_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/depthai_helpers/app_manager.py b/depthai_helpers/app_manager.py index a59047227..475393f7d 100644 --- a/depthai_helpers/app_manager.py +++ b/depthai_helpers/app_manager.py @@ -52,7 +52,10 @@ def createVenv(self, force=False): subprocess.check_call(' '.join([quoted(self.appInterpreter), '-m', 'pip', 'install', '--prefer-binary', '-r', str(self.appRequirements)]), env=initEnv, shell=True, cwd=self.appPath) def runApp(self, shouldRun = lambda: True): - pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath, preexec_fn=os.setsid) + if os.name == 'nt': + pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath) + else: + pro = subprocess.Popen(' '.join([quoted(self.appInterpreter), str(self.appEntrypoint)]), env=initEnv, shell=True, cwd=self.appPath, preexec_fn=os.setsid) while shouldRun(): try: time.sleep(1)