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

Error while trying cog mosaic #236

Closed
alherca73 opened this issue Dec 25, 2020 · 1 comment
Closed

Error while trying cog mosaic #236

alherca73 opened this issue Dec 25, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@alherca73
Copy link

Environment Information

  • geemap version: 0.8.6
  • Python version: 3.7
  • Operating System: Mac OS 10.15.7

Description

While trying to replicate the code + example for COG mosaic I got an error when running the line
Map.add_COG_mosaic(links, name="CA Fire", show_footprints=True, verbose=True)

What I Did

Map.add_COG_mosaic(links, name="CA Fire", show_footprints=True, verbose=True)

Creating COG masaic ...
Failed to add the specified TileLayer.
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/opt/miniconda3/envs/geemap5/lib/python3.7/site-packages/geemap/geemap.py in add_tile_layer(self, url, name, attribution, opacity, shown, **kwargs)
   1378                 opacity=opacity,
-> 1379                 visible=shown ** kwargs,
   1380             )

TypeError: unsupported operand type(s) for ** or pow(): 'bool' and 'dict'

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
<ipython-input-6-75d814cf16d1> in <module>
----> 1 Map.add_COG_mosaic(links, name="CA Fire", show_footprints=True, verbose=True)

~/opt/miniconda3/envs/geemap5/lib/python3.7/site-packages/geemap/geemap.py in add_COG_mosaic(self, links, name, attribution, opacity, shown, titiler_endpoint, username, overwrite, show_footprints, verbose, **kwargs)
   1457             verbose=verbose,
   1458         )
-> 1459         self.add_tile_layer(tile, name, attribution, opacity, shown)
   1460 
   1461         if show_footprints:

~/opt/miniconda3/envs/geemap5/lib/python3.7/site-packages/geemap/geemap.py in add_tile_layer(self, url, name, attribution, opacity, shown, **kwargs)
   1393         except Exception as e:
   1394             print("Failed to add the specified TileLayer.")
-> 1395             raise Exception(e)
   1396 
   1397     def add_COG_layer(

Exception: unsupported operand type(s) for ** or pow(): 'bool' and 'dict'
@alherca73 alherca73 added the bug Something isn't working label Dec 25, 2020
giswqs added a commit that referenced this issue Dec 25, 2020
@giswqs
Copy link
Member

giswqs commented Dec 25, 2020

Thanks for reporting. I just committed code to fix this bug. Please update the package using geemap.update_package() and try again.

@giswqs giswqs closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants