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

  • I'll have a look at this soon!

    Buy Me A Coffee

  • 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

    Buy Me A Coffee

  • 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:

  • edited November 2018

    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

  • edited March 2020

    Hello!


    I am testing my first online experiment and am getting the same error in Chrome


    Uncaught TypeError: Cannot read property '0' of undefined
    See the console for further details
    
    osweb.1.3.3.bundle.js:1 Uncaught TypeError: Cannot read property '0' of undefined
      at Keyboard._get_default_from_synoniem (osweb.1.3.3.bundle.js:1)
      at KeyboardResponse.prepare_allowed_responses (osweb.1.3.3.bundle.js:1)
      at KeyboardResponse.prepare (osweb.1.3.3.bundle.js:1)
      at KeyboardResponse.prepare (osweb.1.3.3.bundle.js:1)
      at ItemStore.prepare (osweb.1.3.3.bundle.js:1)
      at Sequence._prepare_complete (osweb.1.3.3.bundle.js:1)
      at Sketchpad.prepare (osweb.1.3.3.bundle.js:1)
      at Sketchpad.prepare (osweb.1.3.3.bundle.js:1)
      at Sketchpad.prepare (osweb.1.3.3.bundle.js:1)
      at ItemStore.prepare (osweb.1.3.3.bundle.js:1)
    DevTools failed to parse SourceMap: https://cortex.jatos.org/publix/70/102/css/vendors~osweb.1.3.3.bundle.css.map
    DevTools failed to parse SourceMap: https://cortex.jatos.org/publix/70/102/css/osweb.1.3.3.bundle.css.map
    


    Could you help me? Thanks a lot!

  • @Katharina You can find the latest release of OSWeb as part of OpenSesame 3.3. Before we focus on debugging this, could you verify whether the error also occurs with OSWeb 1.3.5?

    If you're already using OpenSesame 3.3, then you can update OSWeb by running the following in the terminal:

    conda update opensesame-extension-osweb -c cogsci -c conda-forge -y

  • I am having a similar issue (running OpenSesame 3.3 and OSWeb 1.3.7). Whenever my script runs into the first instance of a form_base, it crashes.

    The console of my browser basically says the same thing as the user users reported:

    DevTools failed to load SourceMap: Could not load content for User/AppData/Local/Temp/vendors~osweb.1.3.7.bundle.js.map: System error: net::ERR_FILE_NOT_FOUND

    DevTools failed to load SourceMap: Could not load content for User/AppData/Local/Temp/vendors~osweb.1.3.7.bundle.css.map: System error: net::ERR_FILE_NOT_FOUND

    I guess it has something to do with the form_base, but I don't really know how to fix it (or if there's a way to fix it).

  • @trig, these messages are harmless and should not affect the internal functioning of osweb. They are only useful for debugging.

    @sebastiaan, did you also copy the .map files to the new osweb release last time? They are not a strict requirement, but this enables users to give better line no. etc when experiencing errors and copying stacktraces from the console.

    Buy Me A Coffee

  • @Daniel: Okay, thanks. But the experiment crashes nevertheless whenever I want to use a form_base which includes a scale. Is that not supported and I'll need to find a workaround or do you have any advice how I can make that work in the OSWeb context?

  • Hi @trig,

    form_base indeed is currently not supported, and there is no easy workaround to add form functionality to Osweb. Sorry for not being able to offer more help.

    Buy Me A Coffee

  • @Daniel Ah, no worries. Presenting an image display and collecting single responses to questions should also work fine. Also, are inline_scripts not at all supported for OSWeb or is their functionality just limited? Thanks in advance.

  • Hi,

    Inline_scripts are not supported in their python implementation. However, you can use a javascript inline_script instead. This means that you have to translate your code to javascrip, and, if I remember right, not all functionality can be ported. See here: https://osdoc.cogsci.nl/3.3/manual/osweb/#inline-javascript

    Good luck,

    Eduard

    Buy Me A Coffee

  • Awesome, thanks for this tip!

  • Hi there,


    Let me ask here instead of starting a new thread.


    Where are the log files for running OSWeb locally stored? It is probably a lame question so I didn't see it asked before, but I really can't find them.


    Thanks,

    art

  • Hi @Art ,

    When you run OSWeb in a browser locally (i.e. a test run), then the result are only printed to the browser console, and not stored in a local file. This is not intended for data collection, only for testing!

    — Sebastiaan

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games