Displaying items in a SketchPad from a Python dictionary.
I'm creating a dictionary in python from which I plan to reference and retrieve stimuli for display.
Attached is a file with a minimum replication of what I'm doing and the error in question.
In my inline script:
I first create a list of of text stimuli, shuffle it, and then change that list into a tuple. I start with a list because shuffle doesn't work with a tuple (I've also tried using just a tuple foregoing the shuffle but get the same error described below).
I also create a dictionary with keys that match the tuple items.
I then use a sketch pad with the following:
but I keep getting this error: TypeError: unhashable type: 'list'
The code is supposed to display the item in the dictionary that matches the item number in 'Alpha_Stim'.
I've checked the type of object and it is reporting as a tuple. I've also run the code in a Python interpreter and it seems to work fine.
Any idea why I can't get this to work? I assume I'm overlooking something obvious or haven't converted Python code correctly to OpenSesame in the SketchPad.
Thanks as always for your time,