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

[Bug] console says deck: Picked non-existent layer. Is picking buffer corrupt? #9134

Open
1 of 7 tasks
shnkreddy98 opened this issue Sep 3, 2024 · 0 comments
Open
1 of 7 tasks
Labels

Comments

@shnkreddy98
Copy link

Description

On running the example "bindings/pydeck/examples/03 - Event handlers and data selection in pydeck.ipynb", I am not able to get any output back, on_hover or on_click. Its says "deck: Picked non-existent layer. Is picking buffer corrupt?".

Flavors

  • Script tag
  • React
  • Python/Jupyter notebook
  • MapboxOverlay
  • GoogleMapsOverlay
  • CartoLayer
  • ArcGIS

Expected Behavior

No response

Steps to Reproduce

import pydeck as pdk
import pandas as pd
from ipywidgets import HTML

text = HTML(value='Move the viewport')

SCREEN_GRID_LAYER_DATA = (
"https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-bike-parking.json" # noqa
)
df = pd.read_json(SCREEN_GRID_LAYER_DATA)

Define a layer to display on a map

layer = pdk.Layer(
"ScreenGridLayer",
df,
pickable=True,
opacity=0.8,
cell_size_pixels=50,
color_range=[
[0, 25, 0, 25],
[0, 85, 0, 85],
[0, 127, 0, 127],
[0, 170, 0, 170],
[0, 190, 0, 190],
[0, 255, 0, 255],
],
get_position="COORDINATES",
get_weight="SPACES",
)

def filter_by_viewport(widget_instance, payload):
text.value=str(payload)

Set the viewport location

view_state = pdk.ViewState(latitude=37.7749295, longitude=-122.4194155, zoom=11, bearing=0, pitch=0)

Render

r = pdk.Deck(layers=[layer], initial_view_state=view_state)
r.deck_widget.on_hover(filter_by_viewport)
display(text)
r.to_html("screengrid_layer.html")

Environment

  • Framework version: pydeck@ 0.9.1
  • Browser: Chrome 128.0.6613.119
  • OS: iOS 14

Logs

No response

@shnkreddy98 shnkreddy98 added the bug label Sep 3, 2024
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

1 participant