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

New version of Pydantic breaks raster API #198

Closed
ividito opened this issue Jul 14, 2023 · 2 comments
Closed

New version of Pydantic breaks raster API #198

ividito opened this issue Jul 14, 2023 · 2 comments

Comments

@ividito
Copy link
Collaborator

ividito commented Jul 14, 2023

It looks like Pydantic 2.x deprecates something used by our Raster API.

Logs: https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logsV2:log-groups/log-group/$252Faws$252Flambda$252Fveda-backend-uah-dev-rasterapilambda27FDBBDF-ynG70zpie0Um/log-events/2023$252F07$252F14$252F$255B$2524LATEST$255D16db57d013af41d5b4d56391ae7e5ce4

[ERROR] PydanticUserError: `const` is removed, use `Literal` instead For further information visit https://errors.pydantic.dev/2.0.3/u/removed-kwargs Traceback (most recent call last):   File "/var/lang/lib/python3.8/imp.py", line 234, in load_module     return load_source(name, filename, file)   File "/var/lang/lib/python3.8/imp.py", line 171, in load_source     module = _load(spec)   File "<frozen importlib._bootstrap>", line 702, in _load   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked   File "<frozen importlib._bootstrap_external>", line 843, in exec_module   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed   File "/var/task/handler.py", line 8, in <module>     from src.app import app   File "/tmp/pip-target-tirb9c8m/lib/python/src/app.py", line 5, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/rio_cogeo/__init__.py", line 5, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/rio_cogeo/cogeo.py", line 12, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/morecantile/__init__.py", line 14, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/morecantile/defaults.py", line 11, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/morecantile/models.py", line 94, in <module>   File "/tmp/pip-target-tirb9c8m/lib/python/morecantile/models.py", line 97, in TMSBoundingBox   File "/tmp/pip-target-tirb9c8m/lib/python/pydantic/fields.py", line 723, in Field
@vincentsarago
Copy link
Contributor

Sorry we forget to pin pydantic to ~=1.0 for older version of morecantile and rio-tiler

@moradology
Copy link
Contributor

This appears to be resolved by #199.

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

3 participants