Skip to content

visual.Window.resetViewport() error #5135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dip-c opened this issue Sep 16, 2022 · 0 comments
Closed

visual.Window.resetViewport() error #5135

dip-c opened this issue Sep 16, 2022 · 0 comments
Assignees
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior. 👀 visual Issue with presentation of visual stimuli or graphics.

Comments

@dip-c
Copy link

dip-c commented Sep 16, 2022

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()

@mdcutone mdcutone self-assigned this Sep 20, 2022
@mdcutone mdcutone added 🐞 bug Issue describes a bug (crash or error) or undefined behavior. 👀 visual Issue with presentation of visual stimuli or graphics. labels Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior. 👀 visual Issue with presentation of visual stimuli or graphics.
Projects
None yet
Development

No branches or pull requests

2 participants