fmtoma
August 12, 2023, 6:44pm
1
If this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): Windows10
PsychoPy version (e.g. 1.84.x): v2021.1.3
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:
Hello,
I have an experiment that has the following routine:
It is part of a loop that has the following file:
All the cells from the Excel file are defined as text (tried defining them as General, but still received errors):
When I reach this routine, I receive this error message:
prac2_letter.setText(twoback)
AttributeError: ‘str’ object has no attribute ‘setText’
What did you try to make it work?:
I tried renaming the Excel file, the text component, the column name, formatting the cells as Text and General.
Note: I have another file with the exact same routines that does not produce this error.
Do you have any idea on why this happens? I tried looking everywhere and couldn’t find anything.
Chen
August 12, 2023, 8:57pm
2
Hello,
Is it possible that you have two spreadsheets with the same column name?
See the following:
Try renaming the Word object to something else, as there’s a warning on it having the same name as the string column $Word in your conditions.xlsx file. No errors when I changed the text object to wordle.
Chen
fmtoma
August 12, 2023, 9:12pm
3
No, I don’t have 2 spreasheets with the same name.
I had seen that topic too → but I only have one spreadsheet in the entire experiment that is named “practice.xlsx”.
In addition, I tried renaming both the actual spreadsheet and the column name multiple times and I receive the same error message, regardless of what names I put.
Chen
August 13, 2023, 12:12am
4
I see.
Any chance you could share the experiment?
Also, why is your start time set to condition
instead of time (s)
?
Thanks,
Chen
The error message suggests that you are using the name of the component (prac2_letter) in a code component at some point, and setting it as a text variable.