psychopy.org | Reference | Downloads | Github

Unit error when sending experiment to Pavlovia

pavlovia

#1

OS (e.g. Win10): MacOS Mojave 10.14.3
PsychoPy version (e.g. 1.84.x): 3.0.2
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:

I am trying to administer an experiment online so users without PsychoPy can also complete the experiment.

What specifically went wrong when you tried that?:

The first screen to enter the participant’s name works fine, but then the following error message pops up:

What did you try to make it work?:

I tried changing the units under preferences, settings, my text stimuli and a combination of the three. I tried with the different alternatives offered as well (pix, norm, deg…)


#2

Hi @laurafdeza, this was fixed in 3.0.4. We fixed this by changing the screen units in experiment settings to default to ‘height’ units.


#3

Thank you @dvbridges, but it still doesn’t work. I’m also having other problems, like when I tried to add a text stimuli, this happens

and no stimuli is added. I tried the v3.0.6 too and it threw the same error. I uninstalled PsychoPy and reinstalled it and restarted the laptop and nothing worked.


#4

Ok, I have not been able to recreate the error. Would you mind sharing your experiment with me so I can take a look? Just a minimal example that shows the error will be fine.


#5

Of course, @dvbridges. Here is the link to the GitHub repo with the experiment


The idea behind this short task is that participants will hear figurative expressions in Spanish and they will have to choose with a mouse-click the equivalent expression in English from the list available for them on the screen. In total it is 8 expressions in Spanish, but the possible answers in English are 12, so the solution is not as straightforward.

I think the problem might be in my laptop, rather than the software, or some issue in the more basic code, as it will literally not let me do anything in PsychoPy. It does not matter what icon is clicked, nothing happens, regardless of whether it is the experiment already build or starting a new one from scratch. I’m going to try installing v3.0.4.


#6

Thanks @laurafdeza, really useful to send me a link to your repo :). In short, your problems stem from the mixed screen units you are using. I advise setting all units to height, or pixels (which you currently use), and making sure you size your components accordingly.

Running experiment locally in Builder

Running locally I cannot see text on screen because your text size is .1, (the default size when using Height or Norm screen units) and your text components are set to use pix. As this is smaller than a pixel, text will not be drawn and will not appear on screen. See docs.

Running experiment online

As above, components set to pix should either be given sizes in pixels e.g., anything > 1, or sized according to height or norm units (see docs). If you attempt to draw something with a size smaller than 1 pixel, you will get an error, something like:

IndexSizeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.

Setting your components to update correctly

Many of your component parameters are set to update on every repeat, but you are not actually passing a variable to them, so they do not need updating, they can stay constant (see docs). So, only update those params that contain a variable i.e., column from your conditions file.


#7

Thank you very much @dvbridges! It all makes sense.
However, right now I am not able to get there. The software is still not letting me add or modify input, regardless of what version is being used or whether the software as being uninstalled and reinstalled. I recorded a video to show you what I mean. It is in the GitHub repo under the title “PsychoPy_issue.”

I’m so sorry for all the inconveniences.


#8

Ah I see, thanks for the video that was very helpful. It is possible it is related to this post about missing fonts after Mojave 10.14 update.

@jon, have you come across this wx issue with invalid fonts on MacOS Mojave 10.14.3? (The error message is in one of the previous post - the error outputs every time a component is clicked and fails to add a component to the routine).


#9

Hmm, yes, David’s link looks like a candidate for the issue. When you open Font Book on the offending Mac do your fonts show up?

I’m running on Mojave 10.14.2 myself and not experiencing any issues, so I don’t think this is a general thing. That said I’ll try updating a machine to 10.14.3 and see if that breaks anything


#10

Hello @jon. Yes, the fonts do show up.


#11

I’ve now upgraded to 10.14.3 and still no problems at my end.

I wonder if there’s a problem with the specific font that we’re trying to use for the coder. Are you able to get to the application preferences within PsychoPy without a crash? My preferences have Monaco as my code font. What is yours?


#12

It was Arial. Changing it to Monaco did not help. However, playing around with the preferences, I clicked on “Reset preferences” under “App,” restarted PsychoPy and now it seems to be working. Thank you both for your help!