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

raise PydanticImportError( pydantic.errors.PydanticImportError: BaseSettings has been moved to the pydantic-settings package. #319

Open
ttuvera1125 opened this issue Aug 23, 2023 · 3 comments

Comments

@ttuvera1125
Copy link

I already pip install pydantic-settings but I still get the same issue.

@8igMac
Copy link

8igMac commented Aug 29, 2023

Same here. I think pydantic has moved BaseSettings to a seperate package, pydantic-settings (accroding to official doc). So a migration is needed here.

Specifically, this line of code should be modified to the following:

from pydantic_settings import BaseSettings

@hueykwik
Copy link

I'm trying to get Hello World working, but I am stuck because I'm getting this error. Should I get the development version and then make the change @8igMac is referencing to get unstuck?

@amosjyng
Copy link
Contributor

@hueykwik you can manually install pydantic v1 like I did to avoid the error. That is, if the packages you're using supports that

If the ICE maintainers see this: Out of curiosity as another user of Poetry, why was project setup via poetry removed here? The pydantic = "^1.9.1" line in Poetry would've prevented this problem, whereas the new setup.cfg does not declare any version constraints on pydantic. Were there major problems with using poetry?

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

4 participants