Howdy, Stranger!

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

Supported by

Issues with copy canvas / sketchpad

edited February 13 in OpenSesame

I'm using a Droid backend and latest version of OpenSesami.
My problem is that whenever I'm trying to copy canvas or sketchpad that has images on it in inline code I get the following error:
item-stack: experiment[prepare].instructions_script_2[prepare]
exception type: TypeError
exception message: init() got an unexpected keyword argument 'visible'
item: instructions_script_2
time: Sun Feb 10 14:31:05 2019
phase: prepare

  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 77, in prepare
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 124, in _exec
    exec(bytecode, self._globals)
  Inline script, line 5, in <module>
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\openexp\_canvas\", line 158, in copy
    Canvas.copy(self, canvas)
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\openexp\_canvas\", line 757, in copy
    for name, element in canvas._elements.items()
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\openexp\_canvas\_element\", line 47, in copy
    return self.__class__(canvas, **properties)
**TypeError: __init__() got an unexpected keyword argument 'visible'

This is the code i'm trying to use:
c0 = self.copy_sketchpad("trial_4_1_1")
#("trial_4_1_1" has images on it)


_#("all_animals_canvas" is a global canvas object with images)

When I remove the images the code above works..
I would appreciate your help!


  • Hi Bar,

    Thanks for reporting this. Coincidentally I just pushed a fix for this issue yesterday, so it should be fixed for the next maintenance release (3.2.7). It's due to the Image element on the sketchpad. A workaround for now would be to avoid copying sketchpads with images. If this is not feasible in your experiment, then we can try to find a more hacky solution for now (but that's probably more trouble than it's worth).

    I'm using a Droid backend and latest version of OpenSesami.

    Just to avoid confusion: If you plan to run your experiment on Android, note that the latest version for Android is 3.1.8, and that there are issues with recent version of Android:


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

  • edited February 15

    Thank you for your fast answer!
    For now I found a way to deal with the copy issues (just without using copy methods), but it's not the optimal solution..
    When the next version is supposed to be released?

    I have another unrelated question: instead of buying android tablet for this experiment, we want to buy ASUS tablet (Transformer Book) with intel processor and Windows 10 OS.
    Does OpenSesame supports touch screen in non-android tablets? to be more specific-will the "Mousetrap" plug-in work with touch responses on this kinds of tablets?

    Thanks again!

Sign In or Register to comment.