[BUG] ImageURL selection_glyph raises "TypeError: this.retries is undefined"
See original GitHub issueALL 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:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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!
@bryevdv No Problem, I will do so soon!