| Reference | Downloads | Github

Error assigning value to variable from .xls file online due to column of tuples

URL of experiment:

Description of the problem:
I’m trying to assign a color to a shape according to the value of a variable in a .xls file. This works offline just fine, but online I get the following error (color_UL is the header of the column where color is defined in the xls file)

  • ReferenceError: color_UL is not defined

In case it is important, in the xls file, I define the colors by name (e.g. “red”, “blue”…).
I’m currently programming the entire experiment with the Building and not using any code component.

Any help is appreciated!


That’s weird. Seems to work fine for me. Did you resolve this yourself?

Yes, sorry, forgot to comment here again.

I realized that the js code was not being updated due to the way I was defining the position of some stimuli. Basically, I first was defining it with a tuple, which worked in Psychopy but not in the online version. Therefore, all updates I was implementing to the experiment were not being translated into a new js file.

Once I changed the definition of the position to two different columns (one for the x dimension and another for the y dimensions), I synced the project with the online version and the js files were updated accordingly.

I wonder if in future releases it would be possible to implement a warning when you modify your project locally but the js files can’t be updated due to some error in the code.

Yes, we’re working on providing more info at the point of JS creation

1 Like