mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 11:45:49 +03:00
[GH-ISSUE #509] PydanticImportError #395
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Mina4ever on GitHub (Nov 30, 2024).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/509
Originally assigned to: @Mina4ever on GitHub.
Quick Checks
Describe the bug
Trying to open the extracted exe and I am facing below error
"pydantic.errors.PydanticImportError:
BaseSettingshas been moved to thepydantic-settingspackage. See https://docs.pydantic.dev/2.10/migration/#basesettings-has-moved-to-pydantic-settings for more details."To Reproduce
Steps to reproduce the behavior (install dependencies, do this in the auto-py-to-exe UI):
1-run auto-py-to-exe on python command
2-Select py file from GUI and process
3-Trying to open the extracted exe and I am facing below error
"pydantic.errors.PydanticImportError:
BaseSettingshas been moved to thepydantic-settingspackage. See https://docs.pydantic.dev/2.10/migration/#basesettings-has-moved-to-pydantic-settings for more details."Expected behavior
I want the exe file to be executed correctly but it generates the error "pydantic.errors.PydanticImportError:
BaseSettingshas been moved to thepydantic-settingspackage. See https://docs.pydantic.dev/2.10/migration/#basesettings-has-moved-to-pydantic-settings for more details.", I tryed to modify the source code but it written by pyc not pyYour Environment:
Python 3.11.10):2.44.4):6.11.1):0.18.1):@github-actions[bot] commented on GitHub (Nov 30, 2024):
👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.
Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.
@Mina4ever commented on GitHub (Nov 30, 2024):
yes I have read the help post
@brentvollebregt commented on GitHub (Nov 30, 2024):
I just did the following:
auto-py-to-exeto open auto-py-to-exeThe file contains,
And I get no error. It appears your reproduction steps are missing some code and additional steps to reproduce the error. I am unable to help without proper reproduction steps.
Searching for your error leads me to this SO answer. I recommend creating a new Python virtual environment, install the libraries you need and
auto-py-to-exe, and make sure your script is using the correct import for the correct version ofpydanticyou have installed.I can't imagine this error would have not appeared when you ran it before packaging - unless you ran it with one version of
pydanticand packaged in an environment with a different version ofpydantic.@Mina4ever commented on GitHub (Dec 1, 2024):
DataQuilaty.txt
py script attached
@brentvollebregt commented on GitHub (Dec 2, 2024):
Could you provide a minimal reproducible example? I can't imagine having
cx_Oracleorpandas_profilingin the script is causing the issue. If so, it needs to be noted.Also how did using a virtual environment go? (the second part of my reply)
@Mina4ever commented on GitHub (Dec 6, 2024):
first, yes , it's conda virtual environment, with below specs:
Python version (Python 3.11.10)
auto-py-to-exe version (2.44.4)
PyInstaller version (6.11.1)
error.txt
Eel version (0.18.1)
Second: I could find the issue in one of "pandas_profiling" Py file, I have fixed it, however I faced another issue (attached)
Worth to say that i need to convert the shared PY file as is and it's doesn't make sense to my to convert any dumpy py file to exe
@Mina4ever commented on GitHub (Dec 6, 2024):
It works, I copied python library "ydata_profiling" files from virtual environment folder to "_internal" in my app path .
Thank you so much for your support