Howdy, Stranger!

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

Supported by

Some issues with OSWEB

I've recreated a fairly rudimentary task switching experiment in OpenSesame. The file can be found here: https://drive.google.com/file/d/1jha0pOok3sDFyUsOZUCvpun--7nAC4cv/view?usp=sharing

The esperiment runs well while launched from OpenSesame but whenever I try to run it on OSWEB, I get the same error:

`Uncaught TypeError: Cannot read property 'width' of null

See console for further details`

The console looks like this:

I've investigated to the best of my ability but I'm not really sure what's causing the error. Any ideas?

Comments

  • Hi Surya,

    Thanks for giving OSWeb a shot! As you've probably seen (but just in case), OSWeb is still under development so we don't recommend using it in production. But of course we're keen to fix any bugs.

    Regarding the crash. Only a limited number of items is supported by OSWeb, and the form_text_display isn't one of them. However, that doesn't seem to be the only issue, because the error persists even after removing the forms. I'm pinging @Daniel to see whether he can shed some light on this.

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • I'll have a look at this soon!

  • Fixed in v1.1.1
    The culprit was the file extensions of the image files in the pool being uppercase. This caused them to not be correctly recognized and processed as images. I made the extension check case-insensitive and now the experiment runs nicely, in my browser at least.

    And as a sidenote: form_text_display does already work

    Thanked by 1suryamani
  • Thanks very much for the help @Daniel and @sebastiaan ! That seems to completely fix the issue. One quick question: How would you save the acquired data? I've noticed that there is output in the console but is there a more elegant solution other than saving the console output?

  • That seems to completely fix the issue.

    Good!

    How would you save the acquired data? I've noticed that there is output in the console but is there a more elegant solution other than saving the console output?

    We do not (currently) offer a server for logging. However, if you have a web server, you can install JATOS, and run OSWeb experiments from there, as described in the documentation:

    Thanked by 1suryamani

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • edited November 14

    I followed the instructions presented on the link above but I keep gettig this error in OpenSesame when I try to export the study as a JATOS zip file:

    Traceback (most recent call last): File "C:\Users\surya\Desktop\Opensesame\opensesame_3.2.5-py2.7-win32-1\share\opensesame_extensions\oswebext\oswebext_widget.py", line 103, in _export_jatos description=self.experiment.description File "C:\Users\surya\Desktop\Opensesame\opensesame_3.2.5-py2.7-win32-1\lib\site-packages\osweb\export.py", line 72, in jatos js_sources File "C:\Users\surya\Desktop\Opensesame\opensesame_3.2.5-py2.7-win32-1\lib\site-packages\osweb\export.py", line 149, in _html fd.write(html) TypeError: write() argument 1 must be unicode, not str

    Perhaps this is some issue with what is being passed to the write function?

    Here is some info:

    Information:
    Operating System: win32
    OpenSesame: 3.2.5
    Python: 2.7.13

  • Hi Surya,

    There was a bug with Python 2 in the extension. I just pushed a bug-fix release to PyPi (1.1.2.1). Could you try updating and see if this resolves this issue?

    import pip
    pip.main(['install', 'opensesame-extension-osweb', '--upgrade'])
    

    Cheers!
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.