the problem here is about internal paths and files that iconipy can not reach,
this is the error :
C:\Users\moham\Desktop\mine\stack\Final_exe_file\exe>test.exe
Traceback (most recent call last):
File "test.py", line 48, in <module>
File "test.py", line 42, in Get_Button_Icon
File "test.py", line 25, in Get_CTk_Icon
File "test.py", line 11, in Create_Icon
File "iconipy\iconipy.py", line 259, in __init__
File "iconipy\iconipy.py", line 419, in _get_icon_set_version
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\moham\\AppData\\Local\\Temp\\_MEI73962\\iconipy\\assets\\lucide\\version.txt'
[PYI-5844:ERROR] Failed to execute script 'test' due to unhandled exception!
is says the iconipy can not reach the file version.txt.
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\moham\AppData\Local\Temp\_MEI73962\iconipy\assets\lucide\version.txt'
because pyinstaller did not put everything inside the library to your exe application.
so pyinstaller did not add the internal file version.txt to your exe internal files, and because of that this error appears.
to solve this problem you have to add the entire library yourself, as an additional folder to your exe application.
and this will force pyinstaller to add the entire library to your exe.
after that, the library will find the intended file.
do this command in your terminal:
pyinstaller --noconfirm --onefile --console --add-data "C:\Python3-12-8\Lib\site-packages\iconipy;iconipy/" "C:\Users\moham\Desktop\mine\stack\test.py"
replace the paths with your paths, and this will make it work.