Skip to content

copy_sketchpad gives exception: AttributeError: 'Window' object has no attribute '_closed' #815

@dev-jam

Description

@dev-jam

When using:

my_canvas = copy_sketchpad('stimulus')

with the psychopy backend, I get the following exception:

AttributeError: 'Window' object has no attribute '_closed'
Exception ignored in: <function Window.del at 0x7039b75e82c0>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/psychopy/visual/window.py", line 632, in del
if self._closed is False:
^^^^^^^^^^^^

Everything seems to work fine except for flooding the cmd window with this exception.
I checked the psychopy source and it does not have an attribute _closed but instead it defines the variable self._closed = false in its init, so that might be the problem. I recursively checked the opensesame source but I couldn't find the calling of the _closed attribute.

If I exchange

my_canvas = copy_sketchpad('stimulus')

with:

my_canvas = Canvas()

in my code, I don't get the exception.

I am using opensesame 4.0.29 on debian bookworm with psychopy 2023.1.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions