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

"Error serializing widget state attribute: interaction" when clicking the reset button #1519

Open
jasongrout-db opened this issue Aug 25, 2022 · 1 comment
Labels

Comments

@jasongrout-db
Copy link

Describe the bug

There is an error in the console "Error serializing widget state attribute: interaction" when clicking the reset button on a plot.

It seems that clicking the reset button on a plot calls the serialization routine for some reason. However, the interaction attribute only has a deserializer specified, not a serializer, so we end up in error.

To Reproduce

import numpy as np
size = 100
np.random.seed(0)
x_data = np.arange(size)
y_data = np.cumsum(np.random.randn(size) * 100.0)
from bqplot import pyplot as plt
plt.figure(title="My First Plot")
plt.plot(x_data, y_data)
plt.show()

Then click the reset button at the bottom of the plot. Check the browser console for the error "Error serializing widget state attribute: interaction"

Expected behavior

No browser errors when clicking reset immediately after creating a plot

Screenshots

Additional context

My guess is that adding a serializer at

interaction: { deserialize: widgets.unpack_models },
may do the trick? Or figure out why the serializer is called when clicking the reset button?

@ekungurov
Copy link

ekungurov commented Jan 11, 2023

I've also encountered this issue. Reset and panning don't work.

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

No branches or pull requests

3 participants