Skip to content

Commit cecd548

Browse files
committed
api proxy: use the current python interpreter to start uvicorn
1 parent f267249 commit cecd548

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stride/api_proxy.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import time
23
import subprocess
34
from contextlib import contextmanager
@@ -20,7 +21,7 @@ def start(enable=True):
2021
"""
2122
if enable:
2223
STRIDE_API_BASE_URL = config.STRIDE_API_BASE_URL
23-
process = subprocess.Popen(['uvicorn', 'open_bus_stride_api.main:app', '--port', '0'])
24+
process = subprocess.Popen([sys.executable, '-m', 'uvicorn', 'open_bus_stride_api.main:app', '--port', '0'])
2425
port = None
2526
try:
2627
for i in range(1, START_WAIT_TIME_ITERATIONS + 1):

0 commit comments

Comments
 (0)