We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
I have made my first sketch, but if I try to use the save("image.png") function, it throws an error:
save("image.png")
TypeError: VispyRenderer2D.save_canvas() missing 1 required positional argument: 'canvas'
To Reproduce I have installed like this:
brew install glfw pyenv install 3.10.12 mkdir <project> cd <project> pyenv local 3.10.12 python -m venv .venv source .venv/bin/activate git clone https://github.com/p5py/p5.git cd p5 pip install . code ../.
A simple sketch.py example:
sketch.py
from p5 import * def setup(): size(1024, 1024) stroke_weight(2) def draw(): background(255) noFill() stroke(0) begin_shape() vertex(100,100) vertex(200,100) vertex(100,200) vertex(200,200) end_shape(CLOSE) def mouse_pressed(): save("image.png") if __name__ == '__main__': run()
Run python sketch.py
python sketch.py
Expected behavior I expect an png image to be saved, when I click the mouse button.
System information:
The text was updated successfully, but these errors were encountered:
Thank you for submitting your first issue to p5py
Sorry, something went wrong.
Can add that this bug is present with Skia renderer.
TypeError: SkiaRenderer.save_canvas() missing 1 required positional argument: 'canvas'
Also save_frame gives this error: AttributeError: 'SkiaSketch' object has no attribute 'queue_screenshot'
save_frame
AttributeError: 'SkiaSketch' object has no attribute 'queue_screenshot'
Note: save_frame does work with Vispy though you do need to specify the frame numbers manually.
No branches or pull requests
Describe the bug
I have made my first sketch, but if I try to use the
save("image.png")
function, it throws an error:To Reproduce
I have installed like this:
A simple
sketch.py
example:Run
python sketch.py
Expected behavior
I expect an png image to be saved, when I click the mouse button.
System information:
The text was updated successfully, but these errors were encountered: