-
Notifications
You must be signed in to change notification settings - Fork 64
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
Why can not to_file #283
Comments
Thanks for opening an issue. You need to make sure that the canvas has been updated before being able to to |
ok. Does this mean that I can't use ipycanvas in py files, if I want to export pictures (to_file) ? |
It is indeed annoying in this case. I've been thinking of allowing to make the canvas = Canvas()
# Do drawings
await canvas.to_file('test.png') But there are limitations in ipykernel and xeus-python that prevent from doing this for now. Hopefully it will be fixed at some point if this gets in: ipython/ipykernel#589 Though there might be other approaches. I'll try a few things when I have time. |
ipyvolume seems to have a solution for taking screenshots of a widget: https://github.com/widgetti/ipyvolume/blob/master/ipyvolume/pylab.py#L1260-L1271 Thanks @maartenbreddels |
It might be that we need a nest_asyncio solution like @mariobuikhuizen did for https://github.com/widgetti/ipyvuetify/blob/master/ipyvuetify/extra/file_input.py |
The text was updated successfully, but these errors were encountered: