question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] ImageURL selection_glyph raises "TypeError: this.retries is undefined"

See original GitHub issue

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

Windows 10 python 3.6 bokeh 1.1.0 firefox 66.0.3 (64-Bit)

Description of expected behavior and the observed behavior

Essentially I’m trying to hide all ImageURL glyphs, which are not selected. To do so, I’m using the the global_alpha attribute of the ImageURL glyph, however, as soon as something gets selected in the data source, all images disappear, and I get a “TypeError: this.retries is undefined” in my browsers console.

Complete, minimal, self-contained example code that reproduces the issue

from bokeh.plotting import figure, show
from bokeh.models.sources import ColumnDataSource
from bokeh.models import ImageURL


sample_url = "https://upload.wikimedia.org/wikipedia/commons/0/06/CIELAB_color_space_top_view.png"

ds = ColumnDataSource(data=dict(
    xs = [0,5,10],
    ys = [0,5,10],
    urls = [sample_url,sample_url,sample_url],
    hs = [50, 50, 50],
    ws = [50, 50, 50]
))

p = figure(title="Sample", tools=["tap"])


# Circle to select since images can't be selected
p.circle(x='xs', y='ys', size=20, source=ds)

renderer = p.image_url(url='urls', x = 'xs', y = 'ys', h='hs', w = 'ws', w_units="screen", h_units="screen", source=ds)

# We want to hide the non-selected image glyphs
selected_image = ImageURL(url='urls', x = 'xs', y = 'ys', h='hs', w = 'ws', global_alpha=1.0, w_units="screen", h_units="screen")
nonselected_image = ImageURL(url='urls', x = 'xs', y = 'ys', h='hs', w = 'ws', global_alpha=0.0, w_units="screen", h_units="screen")


renderer.selection_glyph = selected_image
renderer.nonselection_glyph = nonselected_image

show(p)

Stack traceback and/or browser JavaScript console output

TypeError: this.retries is undefined

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, May 4, 2019

@ghalter sorry, actually I think your suggestion might be fine after all, since the check to prevent loads is elsewhere. Please submit a PR when you can!

0reactions
ghaltercommented, May 4, 2019

@bryevdv No Problem, I will do so soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with mocha 'retries' #4067 - GitHub
I have a question related to usage of retries inside mocha framework. ... the error TypeError: Cannot read property 'retries' of undefined ....
Read more >
Mocha `retries` callback argument doesn't compile in typescript
Error message: [ts] expected 1-2 arguments, but got 3. It will compile after removing , 3 , how can I make the IDE...
Read more >
Retry Flaky Tests - WebdriverIO
You can rerun certain tests with the WebdriverIO testrunner that turn out to be unstable due to things like a flaky network or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found