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

Duplicate self link in pystac 1.7.2 #1102

Closed
TomAugspurger opened this issue Apr 24, 2023 · 1 comment · Fixed by #1103
Closed

Duplicate self link in pystac 1.7.2 #1102

TomAugspurger opened this issue Apr 24, 2023 · 1 comment · Fixed by #1103
Assignees
Labels
bug Things which are broken
Milestone

Comments

@TomAugspurger
Copy link
Collaborator

import pystac

item = pystac.read_file("https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items/S2A_MSIL2A_20150704T101006_R022_T35XQA_20210411T133707")
links = item.get_links(rel="self")
print(len(links))

for link in links:
    print(link)

That will output

2
<Link rel=self target=https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items/S2A_MSIL2A_20150704T101006_R022_T35XQA_20210411T133707>
<Link rel=self target=https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items/S2A_MSIL2A_20150704T101006_R022_T35XQA_20210411T133707>

for pystac>=1.7.0. On 1.6.1 it outputs just the single self link. None of the other links are duplicated, just self.

@gadomski gadomski self-assigned this Apr 24, 2023
@gadomski gadomski added the bug Things which are broken label Apr 24, 2023
@gadomski gadomski added this to the 1.7.3 milestone Apr 24, 2023
@gadomski
Copy link
Member

Closed by #1103

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

Successfully merging a pull request may close this issue.

2 participants