Skip to content

Conversation

@eschwartz
Copy link
Contributor

What I am changing

  • Update the version of pypgstac installed as part of the Maxar demo notebook

Why I did it

I am using eoAPI for the first time. Following the setup instructions, I ran docker-compose up to setup my environment. I then attempted to run the Maxar demo notebook.

I got an error when running the following command:

# Ingest the collections
!pypgstac load collections collections.json --dsn postgresql://username:password@0.0.0.0:5439/postgis --method insert_ignore

Exception: pypgstac version 0.8.1 is not compatible with the target database version 0.9.2. database version 0.9.2.

I noticed that the database service in docker-compose.yml is using ghcr.io/stac-utils/pgstac:v0.9.2. Updating the jupyter cell to install v0.9.2 fixed the issue.

!python -m pip install "pypgstac[psycopg]==0.9.2"

How you can test it

  • Clone this repo
  • Run docker-compose up
  • Open the Maxar demo notebook in jupyter
  • Run the updated pip install "pypgstac[psycopg]==0.9.2" command
  • Run the following cells, up to and including the pypgstac load collections cell
  • You should not see errors, and the data should be loaded into your pgstac db.

Thank you so much for your work on this project! I'm excited to try it out 😀 🌍

Fixes demo when used with docker-compose environment
This pypgstac version must match the deployed pgstac db version.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Member

@vincentsarago vincentsarago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@vincentsarago vincentsarago merged commit 1e43403 into developmentseed:main Feb 21, 2025
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

Successfully merging this pull request may close these issues.

2 participants