Nback error when practice trials added

**OS: Windows-10
**PsychoPy 2023.2.3

Hi! I am trying to add a set of practice trials directly before my working nback task, but the addition (directly copied from the actual trials, just with the names of the variables within the loop changed) is providing this error:

text=str(nback_ptrials.thisN+1)+‘/’+str(nback_ptrials.nTotal),
UnboundLocalError: local variable ‘nback_ptrials’ referenced before assignment

Here is the structure of the code, where the actual trials pull from “trials”:

$str(trials.thisN+1)+'/'+str(trials.nTotal)

And the practice trials pull from “nback_ptrials”:

$str(nback_ptrials.thisN+1)+'/'+str(nback_ptrials.nTotal)

nback_ptrials does not exist anywhere else in the code. Where is it being reference before its assignment, and how can I fix this?
Thank you!

Does this help?