Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Application Error in OSWeb using form text input

Hi community!

I am working on my first OSWeb experiment and need my participants to give responses using multiple keys (e.g. solutions to 14 x 9). I want them to be able to use backspace and want them to confirm with ENTER. I am using form text input for this.


This all works fine in Open Sesame, but when trying to run this in the browser, I get an error message, namely "Application Error: Uncought TypeError: r.replace is not a function."


Can somebody help me solve this?

Thanks in advance!

Elien

Comments

  • Hi Elien,

    Can you share your experiment?

    Thanks,

    Eduard

    Buy Me A Coffee

  • edited April 2023

    Thank you for your response!

    I'm not sure why the file doesn't load here, but here you have the link to the experiment: https://kuleuven-my.sharepoint.com/:u:/g/personal/elien_bellon_kuleuven_be/EdCS4HN0znlDvHnBngEasKIBWn1ucGXQ4ZthnPDtketpCg?e=col00j

  • @eduard : are you able to download the file?

  • Yes, that worked.

    I tried the experiment, but I don't get your error messsage. How do you start the experiment in the browser? And which version of Opensesame and OSweb are you running?

    I do get another error though. One that seems to originate in an incompatibility with the logger item: Logging (logger): To save bandwidth, select only relevant variables instead of all.

    When I uncheck the "log all variables" option, the experiment runs fine in the browser. This is surprising, because logging all variables is recommended and should also be compatible with osweb (afaik). @sebastiaan is this error expected?

    Eduard

    Buy Me A Coffee

  • When I uncheck the "log all variables" option, the experiment runs fine in the browser. This is surprising, because logging all variables is recommended and should also be compatible with osweb (afaik). @sebastiaan is this error expected?

    Yes. Nothing will go wrong if you log all variables anyway, but we want to discourage users from doing that to, as the message says, save bandwidth. (Which can be considerable if all variables are logged.)

  • Dear @eduard and @sebastiaan

    Thank you so much for reply'ing. I really appreciate it.

    I use OpenSesame 3.3.14. This is the "system information":

    System

    System: Windows-10-10.0.19041-SP0

    Architecture: win64

    Modules and packages

    OpenSesame 3.3.14

    Python 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 21:48:41) [MSC v.1916 64 bit (AMD64)]

    datamatrix 0.15.3

    qdatamatrix 0.1.31

    pseudorandom 0.2.2

    fileinspector 1.0.2

    QNotifications 2.0.6

    QOpenScienceFramework 1.3.1

    opencv 4.2.0

    expyriment 0.10.0+opensesame2

    IPython 7.12.0

    numpy 1.18.1

    scipy 1.3.1

    PIL/ PILLOW [version unknown]

    psychopy 2022.1.4

    pygame 1.9.6

    pygaze 0.7.5a5

    pyglet 1.5.0

    PyQt 5.12.3

    serial 3.4

    markdown 3.2.1

    yaml 5.3


    I followed an introduction video that indicated that I first need to check whether the experiment will run online by clicking on the green circle with white arrow in it ("Run in Browser").

    Can that be the problem?

  • And the version of Osweb?

    Can that be the problem?

    Nah, I do the same.

    Buy Me A Coffee

  • @eduard : The OSWeb version I use is 1.4.13.1

  • Just to be a little bit more clear:

    The online experiment starts as it should and the first forms (name and surname) work, as well as the sketchpad "introduction" and "instructions". My first loop "i.e. practice_controltask" starts, as a fixation dot is shown, but then the experiment stops. Normally, a form_text_input form should start here..

    It does start in OpenSesame (offline).

    The error message I get is the following:

    "Uncaught TypeError: r.replace is not a function.


    Thank you for helping me out! I am really struggling.

  • Ah, this is good to know. Could you reupload your experiment? The link doesn't work anymore.

    Buy Me A Coffee

  • Okay, the problem is are those [variable] statements in the text_input. Seems like that syntax is not supported in text_input forms (or forms in general, maybe). Can you confirm/correct that @sebastiaan?

    Unfortunately, I also can't think of an easy workaround from the top of my head, unless you don't mind presenting the questions in sketchpad, and have participants respond in a separate text input.

    Eduard

    Buy Me A Coffee

  • edited April 2023

    Hi @elienbellon and @eduard ,

    The experiment, which I downloaded from the last link above, contains Python inline_script items, which are simply not supported on OSWeb! I'm afraid that this will have to be rewritten to JavaScript (inline_javascript ) and perhaps partly redesigned, because not all functionality available in Python inline_script items is also available in JavaScript inline_javascript items.

    You can find an overview of supported functionality here:

    — Sebastiaan

  • Hi @sebastiaan

    I'm sorry for the confusion. I tried to work around the problem in an offline version of the task (not to implement it on OS Web) to have a back up plan if the Online version would not be possible. I think that is what messed up the link.


    The file we are refering to is:

    https://kuleuven-my.sharepoint.com/:u:/g/personal/elien_bellon_kuleuven_be/ETWOzqc6jPdAnvhWOeZwVDYBgT4-H1YjeF1llllU5LFg5g?e=rrKddF

  • Hi @elienbellon and @eduard ,

    Ah I see now. Indeed, there was a bug in OSWeb that was triggered by the label in a form_html being numeric

    You can work around that, I suppose, but since you're in the development phase now anyway I would recommend getting the latest OpenSesame 4.0 prerelease. If you start this and wait a while, you'll receive an update notification for opensesame-extension-osweb . (There's a built-in updater now that updates individual packages without having to redownload everything.) After updating OSWeb through that route, the error should be resolved.

    And of course let me know if you run into other issues with 4.0!

    — Sebastiaan

Sign In or Register to comment.