Skip to content

Error in pystac/docs/tutorials/how-to-create-stac-catalogs.ipynb #771

@davedavemckay

Description

@davedavemckay

There is erroneous code in the "How to create STAC catalogs" tutorial.
In the section about adding the eo extension to an Item object, the code throws an AttributeError:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [35], in <cell line: 7>()
      1 eo_item = pystac.Item(id='local-image-eo',
      2                       geometry=footprint,
      3                       bbox=bbox,
      4                       datetime=datetime.utcnow(),
      5                       properties={})
----> 7 eo_item.ext.enable(pystac.Extensions.EO)
      8 eo_item.ext.eo.apply(bands=wv3_bands)

AttributeError: 'Item' object has no attribute 'ext'

The syntax for this in pystac/docs/tutorials/creating-a-landsat-stac.ipynb is different, but I can't see how to rewrite this code in the same way.

Any help much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThings which are brokendocumentationIssues related to PySTAC documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions