DEV Community

Discussion on: How to convert .py to .exe? Step by step guide.

Collapse
 
aadarsh_af profile image
Aadarsh

Hello @eshleron First of all thanks for creating this wonderful GUI App which would help developers convert their scripts, which again propose a GUI App, into a user friendly app!
I've made so many apps using pyinstaller and cx_freeze whichever whenever needed. They're truly a blessing!
Now basically I've created a tkinter script which shows the user latest News and Weather updates using API_KEYS(one for news and the other for weather)... And now when I'm packaging it (by adding all the extra scripts and files it'd need) into an exe file using pyinstaller or cx_freeze... Both the exe files show errors related to the API_KEY of weather app while the script works perfectly fine! I'm attaching images of the errors from both packagers

Error from the Pyinstaller Exe file
The above image is of the error from the Pyinstaller Exe file

Error from the Cx_Freeze exe file
The above image is of the error from the Cx_Freeze Exe file (KeyError 'aadarsh' means that the name I gave to my api_key in the config file)

I have gone through most of the google advices which were from Github, StackOverflow, and many likely sites... I've added snippets to my requests library files and also in the pyinstaller hook folder as per the advices but no change could be found in every other exe file created.... (well the hook advice was helpful earlier when i worked with pydocx library and pyinstaller)

Also please tell me how to contact you by messaging... I need help regarding other programming stuffs too! This one is urgent though

Collapse
 
eshleron profile image
Eshleron

Hi!
Thank you for the kind words regarding the app. Unfortunately for me I am not the author but I completely share your excitement and gratitude towards one.

As for the errors. I think the path solution is worthy of trying first (you can find it in this article under "one file" section)

Try it and see where it leeds.

Some comments have been hidden by the post's author - find out more