psychopy.org | Reference | Downloads | Github

No error messages or logging output in Stdout

I’m using Psychopy 2020.2.3 on Windows 10. Unfortunately, I haven’t been able to isolate when this happens, but more often than not, I get no error messages or logging output in the Runner Stdout window. I just get one line when I run a .py script from the coder view or a .psyexp from the builder view:

#### Running: Path/To/MyFile.py ####

Nothing else follows, even though I’ve set the logging level to debug. From time to time, the correct output shows. My guess is that in these cases I started the PsychoPy app differently or used the running options differently (I haven’t got used to the two options “send experiment to runner” and “run experiment”). The issue is not connected to the psychopy.logging module, because it affects print calls just the same. The experiment starts to run, so execution of the script is not affected (but because I wasn’t able to debug without logging output, it stops after the first routine, without the error being printed to Stdout).

Does someone else have the same issues and solved them or could someone help me to troubleshoot them?

1 Like

I just realized that a .log file is created, so I can access the logging output despite it not being written to Stdout. But the error that made the experiment crash, doesn’t show up in the logging file, so debugging is still difficult.

Clearing the preferences did not solve the issue.

I am having the same problem. Is there a solution for this yet? Other than deinstalling this new version of psychopy and then downgrading to a version, where the messages did appear?

Just a quick addition: I am having the same issues in Version 2020.2.4 – still no error messages in the Stdout window although the experiment crashes halfway through

1 Like

Could you try out the following steps?

  1. Open the coder. (On Windows, just enter Psychopy3 Coder in the search bar)
  2. From the coder view, open your builder file.
  3. Run the experiment.

Does this give you output?

2 Likes

I think I’ve had the same issue. Observations:

  • When I open the Builder and click “Run experiment”, PsychoPy does write to stdout once
  • When I click “Run experiment” again, there is no longer any output in stdout
  • However, printing to stdout still works when I click on “Send experiment to Runner” and start the experiment from the Runner

Hope this helps.

Jan

2 Likes

On my Mac (Version 10.14.6) I get the same thing with PsychoPy 2020.2.4. Nothing except the “Running: …” message is sent to the live logging/the supposed Stdout. I tried putting some print() statements inside of a functioning experiment, but the printed messages don’t show up in Stdout either. It’s the same thing on my other PC, regardless of whether I run PsychoPy in Ubuntu (20.04) or Windows (10). Even if I try opening up an experiment’s “.py” file using the Coder View, or if I run the experiment only once with Builder, I still don’t get any output sent to “Stdout”. In Windows, I did get the “Welcome to PsychoPy3!” message when I ran an experiment with Builder the first time, but then I didn’t get any error messages (even though I ran a malfunctioning experiment that preemptively quit without any description of why). In the Ubuntu case, I hadn’t previously installed PsychoPy, so I don’t think this has anything to do with old preferences lying around or something similar.

Because debugging becomes a lot harder when we can’t see output errors or even inserted print statements’ messages, I actually tried opening up my experiments with an older, pre 2020.2, version of PsychoPy. But that doesn’t work either, because all .psyexp files that have been opened with 2020.2.x have the “before experiment” tab/data for code snippets, and even if it’s empty that breaks backwards compatibility. So for whatever .psyexp file that 2020.2.x has touched, and that I don’t have a backup of, I’m stuck with having no Stdout, unless I actually manually copy routines/components/preferences over to an older version’s project. I do have version control for experiments, but I’d done a number of edits to a couple of them after upgrading to 2020.2.4, so these edits are lost if I backtrack through git commits.

Side issues: I’ve seen some other oddities with the latest version of PsychoPy. If I launch PsychoPy on my Mac, it does start, but I’m not actually shown the Builder window et c until I click the PsychoPy icon in the Dock, I have no idea why (this is different from Ubuntu/Windows). Also on Mac, when I force quit (Esc+Esc) out of experiments, they sometimes leave “ghost windows” behind, meaning that when I go to Mission Control, there are “invisible” empty windows/frames, only noticeable by the space they take up and the border that becomes visible when hovering with the mouse over them. I have to manually close them for them to go away. Just now I got an “unhandled internal error” in Windows related to “PavloviaMenu.appData(‘pavloviaUser’)”: “TypeError: ‘NoneType’ object is not subscriptable”. I’ve had various other error messages pop up recently, but I’ve become a bit numb to them as reporting everything takes time.

The lesson I’ve learned is that I can’t depend on PsychoPy’s latest version to be stable, and I should probably wait before upgrading to any new major release until a number of minor versions have been released. But again, I can’t easily go back in this case.

Edit: I reread @LukasPsy’s post and tried again. I am indeed able to see the output if I open up coder view, open the .psyexp file from the coder view’s file browser, and then click the “run directly” button in the Builder view that pops up.

I’m experiencing the same problem. No error message on stdout. @LukasPsy solutions works, but it would be good if this bug could be fixed.

2 Likes

Yes, that does work (thankfully!).

(Although the “Run experiment” button in Builder doesn’t run the experiment, I always have to send it to the Runner and run from there (but that is a different bug))