Skip to content

ENV variable loading is fragile #116

@wildintellect

Description

@wildintellect
  • stac ipyleaflet version: 0.3.3
  • Python version: Any
  • Operating System: Any

Description

If you miss any of the required ENV variables in the conda config of the environment or don't specify them early enough in a notebook before trying to load a map then you get errors that are not the easiest to read...
image (7)

Ideally we would check/trap these constant loads and issue a clear warning with possible workaround to the users before the Map throws an error. I'm not actually sure why MAAP and VEDA urls are handled differently anyways, can't we just expect a full url supplied every time?

Example:

# @TODO: We need to come here clean this up to make it more agnostic
if "maap" in STAC_BROWSER_URL:
stac_browser_url = self.stac_data["collection"]["href"].replace(
"https://", STAC_BROWSER_URL
)
elif "veda" in STAC_BROWSER_URL:
stac_browser_url = self.stac_data["collection"]["href"].replace(
STAC_CATALOG["url"], STAC_BROWSER_URL

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions