Howdy, Stranger!

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

Supported by

OSweb extension behaving badly

In developing an OSWeb program, I got the somewhat ominous message 'OSweb extension behaving badly'

In the Python console, this was accompanied by the message:

PermissionError: [WinError 5] Access is denied: 'C:\\Users\\...\\AppData\\Local\\Temp\\tmp7h4upatx.osexp'

Later, I discovered that one of the program's sketchpads had a duration of 0. When this was redressed, the messages no longer appeared. So, I assume that the zeo duration was the cause.

Is this correct? Perhaps in a future version messages could be more specific.

Thanks

Comments

  • Hi Pieter,

    Sketchpads with a duration of 0 are nothing extraordinary actually and normally work in Osweb just fine. So if unsetting it really made a difference, I guess that the behavior of other parts of the experiment caused the problem that only appeared when the duration of that sketchpad was set to 0. Nevertheless, it is somewhat of a weird problem. Unfortunately it is not trivial to always have very specific error messages.

    If you like you can share your experiment here, and we can check whether we can reproduce the error and see what is behind this.

    Aside of this, just a clarification. When you use OSweb, there shouldn't be anything in the Python console, as the experiment runs in Javascript online, that is in the browser (by clicking the most right green arrow), or on some server when you upload the experiment to JATOS or something alike. So, the fact that you report the error message in the Python debug window is a bit odd. Are you sure you are not running osweb specific code (e.g. javascript items) with regular Opensesame?

    Eduard

    Buy Me A Coffee

  • edited November 2022

    Thanks, for the quick response.

    And I'm running the experiment in the browser. 😉

    Indeed, the message reappeared after the duration was reset. I will see if I can localise the cause of the messages and than come back to it. It does not seem to interfere with OSweb's functioning

  • These are the messages in the Python console:

    Extension error


    item-stack:

    time: Mon Nov 7 10:55:27 2022

    exception type: PermissionError

    exception message: [WinError 5] Access is denied: 'C:\\Users\\p163222\\AppData\\Local\\Temp\\tmp1sfgdeik.osexp'


    Traceback:

     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libqtopensesame\extensions\_base_extension.py", line 336, in _activate

       self.activate()

     File "C:\Program Files (x86)\OpenSesame\share\opensesame_extensions\oswebext\oswebext.py", line 53, in activate

       self.widget()._test()

     File "C:\Program Files (x86)\OpenSesame\share\opensesame_extensions\oswebext\oswebext_widget.py", line 150, in _test

       os.remove(osexp)

    PermissionError: [WinError 5] Access is denied: 'C:\\Users\\p163222\\AppData\\Local\\Temp\\tmp1sfgdeik.osexp'

  • Hi @Pieter_ ,

    When testing an OSWeb experiment, the .osexp experiment is first saved to a temporary location, then converted to an .html file so that it can be opened in a browser, and finally the temporary .osexp file is removed again. This last step goes wrong in your case, but it's not clear to my why.

    Did the experiment nevertheless open in the browser for testing? If not, then I'm guessing that something went wrong parsing the experiment file, in which case it would be helpful if you could share it here.

    — Sebastiaan

  • Thanks for the response, @sebastiaan

    Strangely, the experiment runs in the browser without problems. So, the 'behaving badly message' seems superfluous. I think it has something to do with the installation. I installed OS as a download stand-alone package. Separately, by means of Anaconda, I installed some parts of of OSWeb for data conversion. This should be independent of OS but perhaps it is not.

  • Hi @Pieter_ ,

    I still don't know where this error comes from, but since it seems harmless I made a small update that catches it. Could you confirm that the error is gone when you update to OSWeb extension 1.4.13.1?

    conda update opensesame-extension-osweb -y
    

    — Sebastiaan

  • Thanks, @sebastiaan , I will check it and let you know.

Sign In or Register to comment.