psychopy.org | Reference | Downloads | Github

Internal Error when pushing to Pavlovia

OS (e.g. Win10): Windows 10
PsychoPy version (e.g. 1.84.x): 2020.2.10
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:

I was pushing code from the Builder to Pavolvia when presented with the unhandled internal error message. Below is the message

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app_psychopyApp.py”, line 864, in onIdle
idle.doIdleTasks(app=self)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\idle.py”, line 120, in doIdleTasks
logging.flush()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 314, in flush
logger.flush()
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 300, in flush
target.write(formatted[thisEntry] + ‘\n’)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\logging.py”, line 208, in write
stream.write(txt)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\runner\runner.py”, line 888, in write
StdOutRich.write(self, inStr, evt)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\stdOutRich.py”, line 40, in write
self.MoveEnd() # always ‘append’ text rather than ‘writing’ it
RuntimeError: wrapped C/C++ object of type StdOutText has been deleted

Does anyone know what this means?
Thank you in advance!

Looks like it’s trying to do something to the Stdout panel in the Runner window after it’s been closed - what windows did you have open when trying to sync? Was this a new project or an existing one?

I also notice you’re using 2020.2.10, there’s a new version out now (2021.1.2) so it may be something we’ve already fixed, might be worth updating to see if the problem persists :slight_smile:

This is a new project. I would like to upload it successfully to Pavlovia and then edit a few things in Python to finalize it and then sync it online. I had the Runner, Builder, Coder, and Google Chrome open when trying to upload. I will go ahead and update to the new version and come back shortly.

What do you recommend to remedy the Stdout panel?

Thank you

So I updated PsychoPy to the latest version and the code successfully pushes online! I had the files in a designated folder but it was a bit buried in other folders so I brought it directly to my downloads. Unfortunately, I have some added custom code and some of it works and some of it doesn’t. The first hiccup I have run into is below. Participants are supposed to answer 1 of 5 practice trials to see if two words are the same color and get feedback as a response.

This is what i have written in Python:
if(prac_resp.keys == str(PCorrAns)) or (prac_resp.keys == PCorrAns):
prac_resp.corr = 1
Smile.setImage(‘smile.png’)
Smile.setSize(0.25)
Smile.setColor(‘yellow’)
else:
prac_resp.corr = 0
Frown.setImage(‘frown.png’)
Frown.setSize(0.25)
Frown.setColor(‘yellow’)

And this is the automatic translation by PyschoPy into Javascript

if (((prac_resp.keys === PCorrAns.toString()) || (prac_resp.keys === PCorrAns))) {
prac_resp.corr = 1;
Smile.setImage(“smile.png”);
Smile.setSize(0.25);
Smile.setColor(“yellow”);
} else {
prac_resp.corr = 0;
Frown.setImage(“frown.png”);
Frown.setSize(0.25);
Frown.setColor(“yellow”);
}

Are there any outstanding errors you can see? Also, is there a way for PsychoPy to tell what’s wrong specifically with the JS code?

Thank you! :smiley: