cancel
Showing results for 
Search instead for 
Did you mean: 

CF deploy error for python package : pydantic.errors.PydanticImportError

piyushgupta
Explorer
0 Kudos

Hi All,

I am facing an issue while trying to deploy Python package on SAP BTP CF. The error states:pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.0/migration/#basesettings-has-moved-to-pydantic-settings for more details. (STDERR, APP/PROC/WEB)#I have tried with Python versions 3.9.x and 3.11.x

Has anyone faced a similar issue recently? It was working fine till last week.

View Entire Topic
AndreasForster
Product and Topic Expert
Product and Topic Expert

Hi piyushgupta_2009 , Have you specified the versions of the Python packages in the requirements.txt file?

Otherwise newer versions of the packages might break the code.

piyushgupta
Explorer
0 Kudos

Ye, I have but I am not using pydantic directly, neither have I changed any version recently

piyushgupta
Explorer
0 Kudos

This got resolved. I was using older version for pandas-profiling. Switching it to latest fixed the issue.

Thanks andreas.forster