-
Notifications
You must be signed in to change notification settings - Fork 10
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
AttributeError: 'TimerWasm' object has no attribute '_timer' #46
Comments
Thanks for the report! It seems like there was a Currently, no Pyodide maintainers are actively maintaining |
Ah... I see....
|
Thanks for the check. Maybe we can remove the |
I managed to circumvent the immediate issue by adding from matplotlib_pyodide.browser_backend import TimerWasm
class Timer(TimerWasm):
def __init__(self, interval=None):
self._timer = None
super().__init__(interval=interval) and injecting that new implementation to @sadukie @ryanking13 any idea? |
The animation was not working because # pyscript.display doesn't know .to_jshtml so call it ourself
html = ani.to_jshtml()
element = document.getElementById(current_target())
if element.tagName == "SCRIPT":
element = getattr(element, "target", element)
element.replaceChildren()
script_element = document.createRange().createContextualFragment(html)
element.append(script_element) |
Problem
Another community member and I were trying to see if Matplotlib's
animation.FuncAnimation
would work in PyScript using this Matplotlib demo.We ran into the following error:
The code is available here on PyScript.com.
More Details
Here's the stack trace of the error:
The text was updated successfully, but these errors were encountered: