psychopy.org | Reference | Downloads | Github

Error caused by importation order


#1

Hello.

I am using PsychoPy 3.0.3 in WIndows 10. I am running this script:

from psychopy import visual, event, core

mywin = visual.Window([800,600], monitor="testMonitor")

information = visual.TextStim(mywin, text = 'Hello')

while True:
    information.draw()
    mywin.flip()

    if len(event.getKeys())>0:
        break
    event.clearEvents()

mywin.close()
core.quit()

When I press any keyboard, the following error appears:

Traceback (most recent call last):
** File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\visual\text.py”, line 220, in del**
** File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\pyglet\gl\lib.py”, line 97, in errcheck**
TypeError: ‘NoneType’ object is not callable

This error does not appears if I import visual before event. Anybody knows why this is happening?