I have an experiment I am trying to upload to Pavlovia, but when I try to Pilot it, it stays on the initializing screen. I made sure I do not have import random (which has been the issue in the past). I think the issue is with the code below. When I look at the code component, it has “/* Syntax Error: Fix Python code */”
Any ideas on how I could change this to make it more JS friendly?
current_category = Corr
current_level = Level
# Check if the specified category exists
if current_category == 'a':
if current_level in category_A_levels:
current_level_trials = category_A_levels[current_level]
elif current_category == 'b':
if current_level in category_B_levels:
current_level_trials = category_B_levels[current_level]
# If the category and level are valid, select a size for the image
if current_level_trials:
size_options = []
for size, num in current_level_trials.items(): #Specifically this line and the one below are a prob
size_options.extend([size] * num)
if size_options:
selected_size = shuffle(size_options)
Thanks in advance!