Module "" broken


I am building an interleaved staircase to test threshold for eight points on screen, on Builder. It is a simple trial: just a presentation of a fixation point, then a polygon and a key_resp to collect responses. Conditions are given in a excel spreadsheet for each of the points desired on screen. All requirements are attended (label, startVal, stepSizes, maxVal and minVal). I also added a “pos” variable, so I can present all the points I need.

Experiment works fine and the threshold is reached for each of the points. But the experiment fails after the end of the loop, on the instruction:

trials.saveAsText(filename + 'trials.csv', delim=',')

Error is:

Traceback (most recent call last):
  File "C:\Users\Felipe Viegas\Desktop\", line 259, in <module>
    trials.saveAsText(filename + 'trials.csv', delim=',')
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\", line 2155, in saveAsText
    fileCollisionMethod=fileCollisionMethod, encoding=encoding
  File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\", line 468, in saveAsText
    reversalStr = str(self.reversalIntensities)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
[Finished in 200.2s with exit code 1]

So… something wrong with the file in the process of saving the reversals for the staircase, right?

I am working in Windows with the latest version of PsychoPy, installed from the standalone version. Other experiments run fine. This is my first one on staircases, though…

Any thoughts will be very helpful.


The problem really lies on the option “Save csv file (summaries)”, which triggers the instruction:

trials.saveAsText(filename + 'trials.csv', delim=',')

Once I changed it to “Save excel file”, the error is gone. Although my problem is solved, I believe it still needed to see why there is a problem with the csv summaries.