Pavlovia textbox can't move to new line

URL of experiment: movietry [PsychoPy]

Description of the problem: Hi I use the textbox to display users’ names and their scores. It works well locally but after upload online all the scores are displayed in one line.
This is what I want it to look like and how it is diaplayed locally.


This is how it looks like online

I suppose something is wrong when compiling to js?
here the local code for textbox


here the online code

Grateful for any suggestion!

Hi @rebeccaS , I can’t see anything wrong in your code. Can I ask if you’re using the textbox component because you want to make use of the right alignment feature? If so, it is currently not available for online studies.

Hi @suelynnmah, thank you for the reply. Do you mean all the content in the textbox will always be displayed in one line online? I just want things to look like what is demonstrated in the first screeshot. I use the textbox because when i use the text function, it can’t change line for variables. Do you have any suggestions on how to change line for variables?

Do you mean you want to present a different variable at a new line? You can do that in both text and textbox component. You just have to use ‘\n’

I did use ‘\n’ but it doesn’t work. Neither in text nor in textbox(textbox works locally but not online). That’s why I’m asking for help here lol

Would you mind sharing your task so that I can take a closer look?

Hi here the code link: Liu Yutong / NewuploadMovietry · GitLab
here the run link : movietry [PsychoPy]
Thank you!

movietry.psyexp (55.5 KB)
Hi, so I used a text component instead of a textbox component and it works aesthetically as you want it.

As a side note, \n works in textbox component in the latest version but because it still is in beta mode, there are some disparities such as the background which will be fixed in the next release :slight_smile:

Thank you so much!!
But after I replace the oringinal psyexp file with this new one in my local folder, I get this error.
Maybe I did something wrong?

Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1066, in runFile
self.app.runner.panel.runLocal(event)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\runner\runner.py”, line 559, in runLocal
exp=self.loadExperiment())
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 221, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 206, in writeScript
self_copy.flow.writeBody(script)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py”, line 206, in writeBody
entry.writeInitCode(script)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\routine.py”, line 131, in writeInitCode
thisCompon.writeInitCode(buff)
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\components\text_init
.py", line 120, in writeInitCode
buff.writeIndentedLines(code % inits)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\params.py”, line 215, in str
self.valType)
TypeError: Can’t represent a Param of type color

Which version of psychopy are you using? This could be a version difference

It’s psychopy.2.10

This is the version that I used to create the task Installation — PsychoPy v2022.1.4 which is also the most current release. The task I sent you should work if you install this version and then sync it online.

I’ve tried this version but it gave me error when i upload things to pavlovia lol. Maybe it doesn’t work on my computer?
The previous version that works is 2020.2.10. Forget to add the 2020

Could you please share the error message you got when you tried uploading the task?

Thank you so much for your help! I add some codes and it works!
thanks again!