.log files? #1162
Unanswered
sannatitus
asked this question in
Q&A
.log files?
#1162
Replies: 1 comment
-
You can try to pipe the output of the import subprocess
import os
from pathlib import Path
ADD_FLAGS = "--no-editor"
SAVE_LOG = True
log_dir = "logdir"
bonsai_path = r"pathtoexe\Bonsai.exe"
workflow_path = r"pathtoworkflow\myworkflow.bonsai"
cwd = Path(__file__).parent.resolve()
output_cmd = f'"{bonsai_path}" "{workflow_path}" {ADD_FLAGS}'
if SAVE_LOG:
os.mkdir(log_dir)
log = open(log_dir + "\\" + 'log.txt', 'a')
bonsai_process = subprocess.Popen(output_cmd, cwd=cwd, creationflags=subprocess.CREATE_NEW_CONSOLE, stdout=log, stderr=log)
else:
bonsai_process = subprocess.Popen(output_cmd, cwd=cwd, creationflags=subprocess.CREATE_NEW_CONSOLE) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone 🌳
Does Bonsai produce .log files, and if so, where do I find them?
Alternatively, does anyone know what the attached Reliability Monitor error means for Bonsai?
I’ve been experiencing some crashing of Bonsai on my desktop acquiring video from two Allied Vision cameras. Bonsai crashes coincide with Windows hardware errors. I believe the issue is that I need to update my graphics card driver (ie, the Windows error attached), but I would like to confirm this.
Thanks for your help everyone,
Sanna
Beta Was this translation helpful? Give feedback.
All reactions