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 · 2 comments
Closed

dm.event() is broken #3564

basnijholt opened this issue Mar 19, 2019 · 2 comments
Milestone

Comments

@basnijholt
Copy link
Contributor

@basnijholt basnijholt commented Mar 19, 2019

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

@philippjfr philippjfr commented Mar 19, 2019

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

Loading

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

@douglasmacdonald douglasmacdonald commented Apr 10, 2019

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.

Loading

@philippjfr philippjfr added this to the v1.12.2 milestone Apr 29, 2019
basnijholt added a commit to python-adaptive/adaptive that referenced this issue May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants