File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
To Solve the above issue you will need to add the below variables in your .profile or .bash_profile
From the Launchpad, open the Terminal
Nano is an easy to use editor
Copy the below lines of code
Press Ctrl+O to save the lines
Press Return to Save
Press Ctrl+X to Exit
To verify that the variables have been added to the .profile, use the below code in the terminal
open -e .profile
Try running your program once again. If the issue has not been resolved, use the same approach with the file
If you get an error message like one of these:
TypeError: 'int' object is not callable
TypeError: 'float' object is not callable
TypeError: 'str' object is not callable
This probably means that you are trying to call a method when a property with the same name is already available.
Simply change the method call into a property access.
For example, if a line like this causes an error message like one of those above:
Try changing the line to this:
.grid method of a widget always returns None. So ensure the the
.grid method of the Entry Widget is always on a separate line.
Operating System: Windows 10
Python Version: 3.7.2
PyInstaller Version: 3.4
This is a fairly annoying error without much information to go by. But luckily for us, a responsible coder has provided a solution to this.
The solution lies in making changes to the file bindepend.py in the Project Folder
Rename the existing file to bindepend_old.py and replace this file with the one available on GitHub as provided below.
Converting to exe using PyInstaller should work perfectly now.
Let me know how you fared.