coercing to Unicode: need string or buffer, int found
I'm designing an experiment in open sesame and I've encountered the following problem:
I'm defining a variable called total_correct_t inside a loop without any values.
I update it in this inline script:
if var.correct == 1:
var.total_correct_t += 1
Whenever that correct == 1 Im getting the error below. Is there any different way for defining variables in open sesame?
I feel like I'm missing something. It doesn't feel right to define the variables I want to document in the independent_variables table.
The error I got:
Error while executing inline script
exception type: TypeError
exception message: coercing to Unicode: need string or buffer, int found
time: Wed Aug 22 11:01:49 2018
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/inline_script.py", line 96, in run
File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/base_python_workspace.py", line 124, in _exec
Inline script, line 2, in
TypeError: coercing to Unicode: need string or buffer, int found