I have some additional code in my experiment that allows it to write to an excel file. This works fine on some of my testing laptops, but not others and I can’t work out why. They have the same versions of psychopy (1.9) and excel (2016). The bit of code it has a problem with is this:
ws.cell(“C”+str(q)).value= str(a)
Where q is a variable that increases by one at each trial (such that it prints outputs on moving down the worksheet)
As I say, on most of my computers, this works fine. However on two of them, it appears not to recognise “c” - it outputs the following error:
########### Running: C:\Python26\Kids\WWW_KID1_scaffolded_lastrun.py ###########
pyo version 0.9.0 (uses single precision)
C:\Python26\Kids\WWW_KID1_scaffolded_lastrun.py:127: DeprecationWarning: Call to deprecated function get_active_sheet (Use the .active property).
ws = wb.get_active_sheet()
C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\pyglet\font\text.py:320: DeprecationWarning: Use pyglet.text.Label
instead
warnings.warn(‘Use pyglet.text.Label
instead’, DeprecationWarning)
C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\pyglet\text\layout.py:1055: DeprecationWarning: generator ‘ZipRunIterator.ranges’ raised StopIteration
for start, end, (font, element) in runs.ranges(0, len(text)):
C:\Program Files (x86)\PsychoPy2_PY3\lib\site-packages\pyglet\text\layout.py:388: DeprecationWarning: generator ‘ZipRunIterator.ranges’ raised StopIteration
for start, end, decoration in context.decoration_iter.ranges(i, i + n_glyphs):
Traceback (most recent call last):
File “C:\Python26\Kids\WWW_KID1_scaffolded_lastrun.py”, line 695, in <module>
ws.cell(“C”+str(q)).value= str(a)
TypeError: cell() missing 1 required positional argument: ‘column’
Is there any reason why there would be a difference between computers in how psychopy interprets this kind of code? Or something else I’m missing? I’ve tried removing the speech marks around C, but it then said it didn’t recognise “C”
Thanks!