Earning_text is not defined

I am still working on my IGT and managed to do some updates but i keep getting the error that the earning_text is not defined. I tried pasting it onto ChatGPT but it wasn’t helping so I was hoping anyone could help me with this please.

I’ve attached the experiment for the code
IGT.psyexp (49.6 KB)

Is this error local or online?

local

image

Are you sure that your error wasn’t earnings_text is not defined?

Why do you have earnings_text_stim defined as a component AND earning_text_stim in code?

Please don’t use win.flip() in Builder experiments.

I made typos which were my mistake and the experiment works but everytime i press one of the keys, it says that i’ve made 0 pounds and it isn’t accumulating, how do i fix this?

I can’t see any code that affects earnings_text in End Routine of Select or Begin Routine of Feedback_3. Try moving the code from Begin Experiment

The text for earnings_text_stim should be set Each Repeat not every frame.

I moved the code to begin of routine and now the text is enlarged and it’s still not reading the excel spreadsheet
IGT.psyexp (51.9 KB)

In Select you have four images set to card_choice.jpg each repeat. What is that supposed to do?

In code_2 you are using pandas to read the same Excel spreadsheet as the loop. Why?

In code_2 you are creating a text component called earnings_text_stim which is the same as your text component. Why?

I thought that was what you were meant to do for the card images so the cards always show on every loop. I don’t really understand how this software works as the module doesn’t teach us a lot of the software itself.

I thought that pandas would be useful to handle the data, would it not be needed?

I did also realise my mistake my apologies so I removed it from the code.

Perhaps it would be a good idea to watch some videos, such as

Alternatively, my PsychoPy Primer slides are here:

https://docs.google.com/presentation/d/e/2PACX-1vT76DDSE_Kf0ZsGj98rsIk5AKRg12NICDHtW46bAH_-BJ_ZFzdnJ_81nqZ-AH2a2UH1JXplQfkPXFSk/pub?start=false&loop=false&delayms=10000&slide=id.p

So i watched the video but the video didn’t mention any sort of coding, I am aware that the problem with my experiment comes with my coding with reading the excel spreadsheet on key response so is there any other video that would be better?

I think you should start by building the experiment without code and then work out what customisation you still need.