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

ExtensionNotImplemented error #190

Closed
gtgrp-user opened this issue May 30, 2022 · 3 comments
Closed

ExtensionNotImplemented error #190

gtgrp-user opened this issue May 30, 2022 · 3 comments

Comments

@gtgrp-user
Copy link

As suggested in a comment in #182, I tried the label collection in Africa (ref_landcovernet_af_v1_labels). However, I now receive the following error.

---------------------------------------------------------------------------
ExtensionNotImplemented                   Traceback (most recent call last)
/tmp/ipykernel_17820/416491967.py in <module>
      2 
      3 first_item = next(item_search.get_items())
----> 4 first_item_label_ext = LabelExtension.ext(first_item)
      5 
      6 label_classes = first_item_label_ext.label_classes

/opt/conda/lib/python3.8/site-packages/pystac/extensions/label.py in ext(cls, obj, add_if_missing)
    699         """
    700         if isinstance(obj, pystac.Item):
--> 701             cls.validate_has_extension(obj, add_if_missing)
    702             return cls(obj)
    703         else:

/opt/conda/lib/python3.8/site-packages/pystac/extensions/base.py in validate_has_extension(cls, obj, add_if_missing)
    174 
    175         if cls.get_schema_uri() not in obj.stac_extensions:
--> 176             raise pystac.ExtensionNotImplemented(
    177                 f"Could not find extension schema URI {cls.get_schema_uri()} in object."
    178             )

ExtensionNotImplemented: Could not find extension schema URI https://stac-extensions.github.io/label/v1.0.1/schema.json in object.
@TomAugspurger
Copy link

TomAugspurger commented May 30, 2022

Thanks for looking into this, I haven't had a chance yet.

If you're interested in working on this, I suspect that this collection has started using the classification extension rather than the label extension. The notebook code will need to be updated as well.

@gtgrp-user
Copy link
Author

gtgrp-user commented May 31, 2022

Thanks for your quick response. I am using the pystac version 1.4.0 which doesn't include the classification extension. Am I missing something?

@TomAugspurger
Copy link

Closing this in favor of #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants