Closed jk694exe closed 5 months ago
Initial investigation in person suggest a few suggested routes to explore:
Further in person investigation:
The script that may be causing this is the manager batch file in the root folder, which uses the Windows-specific term start (open is the Mac term). ChatGPT advises us to use a Python Script to do this instead. However, I'm not sure which file calls the manager batch file, and how to integrate this:
import os
import subprocess
import sys
def run_command_windows():
try:
# Starting the Python backend
subprocess.Popen(["cmd", "/k", "python", "Backend_ftt.py", "--DEBUG"], shell=True)
# Starting the npm server
subprocess.Popen(["cmd", "/k", "npm", "run", "serve", "--prefix", "Manager_new"], shell=True)
except Exception as e:
print(f"Failed to execute Windows commands: {e}", file=sys.stderr)
def run_command_mac():
try:
# Using os.system to run commands on Mac
os.system("python Backend_ftt.py --DEBUG &")
os.system("npm run serve --prefix Manager_new &")
except Exception as e:
print(f"Failed to execute Mac commands: {e}", file=sys.stderr)
if os.name == 'nt': # Windows
run_command_windows()
else: # macOS and other Unix-like OSes
run_command_mac()
Attached the error file when running the FTT model on Mac error_macJK (1).docx