Using WinPython-PyGaze-0.6.0 package after reading "Python for experimental psychologist"
I am doing a memory experiment, and for that I read "Python for experimental psychologist".
I am using the psychopy "way" of doing, but even with pygaze I systematically got two error messages, even though the script is runing (sometimes) correctly.
Here are the two error messages, and the begining of my script. I am just giving the begining because whatever I do, I got the error messages
First error:
FreeType import Failed: expected string or Unicode object, NoneType found
Second error:
0.4375 ERROR avbin.dll failed to load.
Try importing psychopy.visual as the first library
(before anything that uses scipy)
and make sure that avbin is installed.
0.4479 ERROR avbin.dll failed to load.
Try importing psychopy.visual as the first library
(before anything that uses scipy)
and make sure that avbin is installed.
0.5047 WARNING Creating new monitor...
0.5048 WARNING Creating new monitor...
The begining of my script :
LOGFILENAME = raw_input('Participant name: ')
LOGFILE = LOGFILENAME
from psychopy.visual import Window, TextStim, Circle
from constants import *
from psychopy.event import waitKeys
from psychopy.core import wait
import random
# create a Window to deal with the monitor
disp = Window(size=DISPSIZE, units='pix', color=BGC, fullscr=True)
disp
disp.flip()
wait(1)
# create a Circle stimulus for fixation purposes
fixstim = Circle(disp, radius=6, edges=32, lineColor=FGC, fillColor=FGC)
## open a new file instance
log = open(LOGFILE + '.tsv', 'w')
# define a header
header = ['Sujet','Type_Word', 'Word', 'condPGD', 'Resp', 'Correct', 'Correct_Type', 'Hit', 'Miss', 'FA', 'CR', 'RT']
# make all values in the header into strings (all values are strings already, but this is an example)
line = map(str, header)
# join all string values into one string, separated by tabs ('\t')
line = '\t'.join(line)
# add a newline ('\n') to the string
line += '\n'
# write the header to the log file
log.write(line)
Comments
Please note that this package is using a version of Python that is no longer supported, and I would highly recommend you use a local install of a newer version instead.
A new edition of the book is on the way!