stac-utils / pgstac

Schema, functions and a python library for storing and accessing STAC collections and items in PostgreSQL
MIT License
153 stars 39 forks source link

No module named 'pypgstac.pgstacrs' #260

Closed drnextgis closed 3 months ago

drnextgis commented 7 months ago

I've just cloned the repo and am attempting to execute pypgstac:

➜  pgstac git:(main) ✗ docker compose run pypgstac
[+] Running 1/0
 ⠿ Container pgstac  Running                                                                                                                                                                                  0.0s
root@ff597a78a779:/opt/src/pypgstac# pypgstac          
Traceback (most recent call last):
  File "/usr/local/bin/pypgstac", line 5, in <module>
    from pypgstac.pypgstac import cli
  File "/opt/src/pypgstac/python/pypgstac/pypgstac.py", line 11, in <module>
    from pypgstac.load import Loader, Methods, Tables
  File "/opt/src/pypgstac/python/pypgstac/load.py", line 40, in <module>
    from .hydration import dehydrate
  File "/opt/src/pypgstac/python/pypgstac/hydration.py", line 5, in <module>
    from pypgstac.pgstacrs import hydrate  # noqa # pylint: disable=unused-import
ModuleNotFoundError: No module named 'pypgstac.pgstacrs'
drnextgis commented 7 months ago

The contents of the local folder overwrite those of /opt/src/pypgstac/python/pypgstac due to: https://github.com/stac-utils/pgstac/blob/513de6033c0d77cb156d2c0c2e454cff60fb5a0b/docker-compose.yml#L36 Should we consider removing that volume?