Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qprocess exiting with exit code 255 when trying to run python script

Qprocess exiting with exit code 255 when trying to run python script

Scheduled Pinned Locked Moved Solved General and Desktop
qprocessqt c++python
22 Posts 4 Posters 5.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Adithya
    2 Apr 2024, 09:02

    @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::Running

    But any idea why I am not getting the log .

    J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 2 Apr 2024, 09:05 last edited by
    #21

    @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.

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    2
    • A Offline
      A Offline
      Adithya
      wrote on 2 Apr 2024, 09:13 last edited by
      #22

      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.

      1 Reply Last reply
      1
      • A Adithya has marked this topic as solved on 2 Apr 2024, 09:13

      21/22

      2 Apr 2024, 09:05

      • Login

      • Login or register to search.
      21 out of 22
      • First post
        21/22
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved