Skip to content

visual.Window.resetViewport() error #5135

Description

@dip-c

When I run

from psychopy import visual  
win = visual.Window()  
win.resetViewport()  

with psychopy 2022.1.4 and python 3.8.13 on a Win10 laptop with integrated graphics, I get an error

File:  "psychopy\visual\window.py", line 1710, in resetViewport
    self.scissor = self.viewport = self.frameBufferSize
TypeError: this function takes 4 arguments (2 given)

It seems that the line should be self.scissor = self.viewport = [0,0] + self.frameBufferSize to correctly reset the viewport.

Edit: I didn't see the frameBufferSize is a numpy array, so the fix should be self.scissor = self.viewport = [0,0] + self.frameBufferSize.tolist()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🐞 bugIssue describes a bug (crash or error) or undefined behavior.👀 visualIssue with presentation of visual stimuli or graphics.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions