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

PydanticUserError('const is removed, use Literal instead', code='removed-kwargs') #2

Open
AlexNguyen124 opened this issue Aug 16, 2023 · 2 comments

Comments

@AlexNguyen124
Copy link

AlexNguyen124 commented Aug 16, 2023

pydantic v2 is unsupported


PydanticUserError Traceback (most recent call last)
in <cell line: 5>()
3
4 get_ipython().system('pip install jiggybase')
----> 5 import jiggybase
6 import jiggybase.collection
7 import jiggybase.models

6 frames
/usr/local/lib/python3.10/dist-packages/pydantic/fields.py in Field(default, default_factory, alias, alias_priority, validation_alias, serialization_alias, title, description, examples, exclude, include, discriminator, json_schema_extra, frozen, validate_default, repr, init_var, kw_only, pattern, strict, gt, ge, lt, le, multiple_of, allow_inf_nan, max_digits, decimal_places, min_length, max_length, **extra)
747 const = extra.pop('const', None) # type: ignore
748 if const is not None:
--> 749 raise PydanticUserError('const is removed, use Literal instead', code='removed-kwargs')
750
751 min_items = extra.pop('min_items', None) # type: ignore

PydanticUserError: const is removed, use Literal instead

For further information visit https://errors.pydantic.dev/2.1.1/u/removed-kwargs

@AlexNguyen124
Copy link
Author

I thinks this is because pydantic v2 ships with Ubuntu 22.04 LTS whereas v1 ships with 20.04 LTS.

@mgrillo75
Copy link

mgrillo75 commented Aug 16, 2023 via email

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

2 participants