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

dm.event() is broken #3564

Closed
basnijholt opened this issue Mar 19, 2019 · 3 comments · Fixed by #3666
Closed

dm.event() is broken #3564

basnijholt opened this issue Mar 19, 2019 · 3 comments · Fixed by #3666
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@basnijholt
Copy link
Contributor

Run in one cell

def plot_generator():
    while True:
        yield hv.Curve(np.random.rand(10))

dm = hv.DynamicMap(plot_generator(),
                   streams=[hv.streams.Stream.define('Next')()])
dm

then dm.event() has no effect and nothing appears in the JS console.

For now calling hv.streams.Stream.trigger(dm.streams) works.

Related: python-adaptive/adaptive#166

@philippjfr
Copy link
Member

Note that I suspect this happens only when none of the streams define any actual parameters.

@philippjfr philippjfr added type: bug Something isn't correct or isn't working regression labels Mar 19, 2019
basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 19, 2019
basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 19, 2019
basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 20, 2019
@douglasmacdonald
Copy link
Contributor

https://github.com/pyviz/holoviews/blob/52548a6732881ed5c2cad1ad5b3ea2a163e092a3/holoviews/core/spaces.py#L1031

In the tutorial, http://holoviews.org/user_guide/Responding_to_Events.html, I could not get this to work for hv.version '1.12.0'

for i in range(40):
    dmap.event()

However, the periodic example did work

dmap.periodic(0.1, 1000, timeout=3)

I had a snoop around the code and, when I tried the loop like this it worked

for i in range(40):
    #dmap.event
    hv.streams.Stream.trigger(dmap.streams) # I got this line from periodic call.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants