Skip to content
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

IpyCanvas raising errors #44

Closed
MarcSkovMadsen opened this issue Dec 18, 2021 · 1 comment · Fixed by #69
Closed

IpyCanvas raising errors #44

MarcSkovMadsen opened this issue Dec 18, 2021 · 1 comment · Fixed by #69

Comments

@MarcSkovMadsen
Copy link

MarcSkovMadsen commented Dec 18, 2021

Panel: 0.12.6 Bokeh: 2.4.2 ipywidgets_bokeh: 1.2.1 ipycanvas: 0.10.2 ipykernel: 6.6.0

Raises expected a string or ArrayBuffer, got object.

image

# pip install ipycanvas panel ipywidgets_bokeh
import panel as pn
from ipycanvas import Canvas

pn.extension('ipywidgets')

canvas = Canvas(width=200, height=200)

# Cubic curves example
def draw():
    canvas.begin_path()
    canvas.move_to(75, 40)
    canvas.bezier_curve_to(75, 37, 70, 25, 50, 25)
    canvas.bezier_curve_to(20, 25, 20, 62.5, 20, 62.5)
    canvas.bezier_curve_to(20, 80, 40, 102, 75, 120)
    canvas.bezier_curve_to(110, 102, 130, 80, 130, 62.5)
    canvas.bezier_curve_to(130, 62.5, 130, 25, 100, 25)
    canvas.bezier_curve_to(85, 25, 75, 37, 75, 40)
    canvas.fill()
    print("drawn")

pn.state.onload(draw)

pn.panel(canvas, height=200, width=200).servable()
@MarcSkovMadsen MarcSkovMadsen changed the title IpyCanvas not working IpyCanvas raising errors Dec 18, 2021
@MarcSkovMadsen
Copy link
Author

MarcSkovMadsen commented Dec 20, 2021

Any hints @mattpap? We are trying to debug problem here https://github.com/martinRenou/ipycanvas/issues/236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant