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][Jupyter Widget] Hexbin fails with EnhancedColumnLayer TypeError

See original GitHub issue

Describe the bug Kepler fails to load an hexbin map widget with error:

deck: error during initialisation of EnhancedColumnLayer({id: 'lifibkk-hexagon-cell'}) TypeError: Class constructor o cannot be invoked without 'new'

To Reproduce Steps to reproduce the behavior:

  1. load kepler
  2. Add data: GeoDataFrame with hex_id column containing H3 hashes at resolution 5,6
  3. Try to load map

Expected behavior

An interactive map widget should be displayed. It works at resolution 5, but fails for hashes at resolution 6.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Python version: 3.7.7
  • keplergl Widget version: 0.3.2

Additional context I tried loading the same data on the demo website and it works.

Within Jupyter, I also converted the hashes to lat/lon points and they are correctly loaded in the expected location

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:16

github_iconTop GitHub Comments

1reaction
sinannoureddinecommented, Jul 24, 2022

Thanks a lot @Sandbird ! That actually helped!

0reactions
SebastianoFcommented, Nov 23, 2022

It seems to be a problem with some hexagons, and not related to the mapbox key.

Here is an example to reproduce the bug:

    import pandas as pd  # 1.5.1
    from keplergl import KeplerGl  # 0.3.2

    # This fake dataset does not work, and provide a white screen.
    df_fake = pd.DataFrame({"hex_id": ["8bbe08421b1afff", "8bbe08424320fff"], "num": [2,4]})  
    
    # This fake dataset works correctly (comment it out to try the faulty one):
    df_fake = pd.DataFrame({"hex_id": ["85111153fffffff", "8510a49bfffffff"], "num": [2,4]}) 

    map_1 = KeplerGl(
        data={
            "hex_id": df_fake.copy()
        }, 
    )
    map_1

Hope this help reproducing the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

keplergl 0.3.2 - PythonFix.com
This is a simple jupyter widget for kepler.gl, an advanced geospatial ... Widget] Hexbin fails with EnhancedColumnLayer TypeError ...
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