Issues with copy canvas / sketchpad
Hey,
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
Traceback:
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\inline_script.py", line 77, in prepare
self.experiment.python_workspace._exec(self.cprepare)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\base_python_workspace.py", 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\legacy.py", line 158, in copy
Canvas.copy(self, canvas)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\openexp\_canvas\canvas.py", line 757, in copy
for name, element in canvas._elements.items()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\openexp\_canvas\_element\legacy.py", 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)
OR
c0=Canvas(exp)
c0.copy(all_animals_canvas)
_#("all_animals_canvas" is a global canvas object with images)
_
When I remove the images the code above works..
I would appreciate your help!
thanks,
Bar
Comments
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 thesketchpad
. A workaround for now would be to avoid copyingsketchpad
s 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).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:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hey,
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!
Bar
There's no set date, but it's just an maintenance release, so I'd say in the next two months or so.
Touch screens are supported. But they are a bit finicky in the sense that most systems translate a touch release (rather than the touch itself) to a mouse click. I'm not sure that's configurable and, if so, how.
Regarding Mousetrap, that's a question best left for @Pascal!
Cheers!
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Bar, hi Sebastiaan,
I have not tried out OpenSesame & mousetrap with Windows tablets so far. However, internally mousetrap uses OpenSesame's Mouse.get_click function to detect cursor clicks. So, based on what Sebastiaan suggested I would suspet that mousetrap would treat touch releases as mouse clicks.
Best,
Pascal