Qprocess exiting with exit code 255 when trying to run python script
-
@JonB @jsulm using python3 actually worked .But not sure whether the script is being executed or not
I changed .py file something like this (running in infinite loop)if name == 'main':
while True:
print("Hey there")The process is still running
Log :
Process = QProcess::Starting
ERROR: QProcess::UnknownError
Process = QProcess::RunningBut any idea why I am not getting the log .
@Adithya said in Qprocess exiting with exit code 255 when trying to run python script:
running in infinite loop
Please do NOT do such infinite loops in an event driven frameworks like Qt! There is really no need for that and it blocks Qt event loop.
"I am not getting the log" - please explain how you're getting this log and what do you actually mean exactly by "log". If you mean the output of your script then I already suggested to read its stderr/stdout. -
wrote on 2 Apr 2024, 09:13 last edited by
Thanks guys it worked. python3 and readyReadStandardOutput(showed the log ,was expecting it to work like qDebig() and cout .My bad) . Sorry for bothering with wrong misconception.
-
21/22