I'm trying to turn a python project into a .exe file using py2exe, but I'm getting the error error: [WinError 87] The parameter is incorrect. It still creates the .exe file, but it crashes as soon as launched. I'm running Python 3.9.6 and Windows 10.
Here is my setup file:
from distutils.core import setup
import py2exe
setup(console=['GUI.py'])
And here is the full error message:
running py2exe
selenium\webdriver\firefox\firefox_profile.pyc:208: SyntaxWarning: "is" with a literal. Did you mean "=="?
12 missing Modules
------------------
? PIL imported from openpyxl.drawing.image
? Queue imported from urllib3.util.queue
? _posixshmem imported from multiprocessing.resource_tracker, multiprocessing.shared_memory
? backports imported from urllib3.packages.ssl_match_hostname
? brotli imported from urllib3.response, urllib3.util.request
? collections.Mapping imported from urllib3._collections
? collections.MutableMapping imported from urllib3._collections
? defusedxml imported from openpyxl.xml, openpyxl.xml.functions
? numpy imported from openpyxl.compat.numbers
? openpyxl.tests imported from openpyxl.reader.excel
? readline imported from cmd, code, pdb
? test imported from multiprocessing.util
Building 'dist\GUI.exe'.
error: [WinError 87] The parameter is incorrect.