Error when presenting images at different durations

Windows 10
PsychoPy version** 2021.1.4
Standard standalone
I want to present half the images for 1s and the other half for 3s in my experiment.

In the image dialogue box I set [stop] duration to a variable corresponding to a column in the excel sheet which contains the file names and experimental conditions. The time was set in seconds. Exact timings are not needed - roughly 1s for one set of images and 3s for another set of images is fine.

I received the following error message:

Running: E:\Hull\Hons 2021\Lizzie\Facebias encoding time\

1412.1818 INFO Loaded monitor calibration from [‘2021_10_12 12:44’]
File “E:\Hull\Hons 2021\Lizzie\Facebias encoding time\”, line 748
if tThisFlipGlobal > RateImage.tStartRefresh + $Duration1-frameTolerance:
SyntaxError: invalid syntax

Experiment ended.

Thank you

Try removing the dollar sign

Thank you, that worked. I tried every permutation I could, before posting, but not that one. Thank you so much for replying so quickly. Merry Christmas.