AttributeError: 'int' object has no attribute 'tStart'

Hi, I have been building/coding a memory task which uses left,down,right arrows as responses. The task worked fine until this error came up and I am not sure how to fix it or what I’ve done to cause it. Started using psychopy 2 weeks ago, so very new! Would appreciate any help. The error is in bold, at least that’s what psychopy is telling me. I’ve checked other areas where there is similar coding and there is no issue. The task crashes when it proceeds to the retrieval part of the task.
response_keys.keys =
response_keys.rt =
_response_keys_allKeys =
# store start times for Retrieval
Retrieval.tStartRefresh = win.getFutureFlipTime(clock=globalClock)
Retrieval.tStart = globalClock.getTime(format=‘float’)
Retrieval.status = STARTED
thisExp.addData(‘Retrieval.started’, Retrieval.tStart)
Retrieval.maxDuration = None
# keep track of which components have finished
RetrievalComponents = Retrieval.components
for thisComponent in Retrieval.components:
thisComponent.tStart = None
thisComponent.tStop = None
thisComponent.tStartRefresh = None
thisComponent.tStopRefresh = None
if hasattr(thisComponent, ‘status’):
thisComponent.status = NOT_STARTED
# reset timers
t = 0
_timeToFirstFrame = win.getFutureFlipTime(clock=“now”)
frameN = -1

It sounds like one of the names of the components in your Retrieval routine is also being used for something else.

Yes, so before the image they have to memorise, is a reward either high or low. I had this as a component in my encoding excel file so that I could make a loop to say if the reward is high (£1) show text £1 if low show 10p. I then did the same in the retrieval as feedback to let them know how much they have earned but it was only either showing 10p the whole block which didnt correspond to the initial encoding file. So then I decided to add the reward component in the retrieval excel but named it differently to how it is in the encoding file. I thought renaming it would solve the issue, but its still showing the error. this may be the issue but not sure

Please could you show a bit more of the current error message?

I’m pretty sure it’s due to a name conflict and the error message may help identify which name is being reused.

Sure,

This is the error message:

thisComponent.tStart = None

AttributeError: ‘int’ object has no attribute ‘tStart’

I meant more than that but never mind. What are the names of the components in the Retrieval routine? Perhaps you could show a screenshot?

these are the components

Now go to Experiment - Find in Experiment and search for each one in turn to see if it appears elsewhere. I assume none of them are column titles in any of your spreadsheets.

Hi, ‘Reward_F’ is a column in the excel, so I just removed it from the components list and it works now! Thank you.

I’m slightly confused by the wording of your answer. The normal reply would be “so I renamed the component”. Did you have a component called Reward_F? Do you still have one?

Reward_F was not a component but a column title in my excel, so it shouldn’t have been in the components list.