Search code examples
python-2.7python-requestspy2exe

python py2exe: exe creation/errors


I'm trying to create a windows executable for a python program using tkinter. This is essentially a webscraper using the requests module. I'm not sure where to start troubleshooting my issue. I'm able to create the exe and run it. My program has a login view, and when this is submitted and requests are made is when the error shows up. You need to be using a VPN to make these requests, so I'm not posting all my code here yet. Please let me know if any additional info/code is needed. The following error only shows up when running the exe, not the original python file. Here is the error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "Tkinter.pyc", line 1486, in __call__
  File "Dest_gui.py", line 222, in login_gui
  File "Dest_gui.py", line 29, in login
  File "requests\sessions.pyc", line 498, in post
  File "requests\sessions.pyc", line 456, in request
  File "requests\sessions.pyc", line 559, in send
  File "requests\adapters.pyc", line 382, in send
SSLError: [Errno 185090050] _ssl.c:344: error:0B084002:x509 certificate      routines
:X509_load_cert_crl_file:system lib

Solution

  • I was not able to get this working with py2exe, but it does work just fine using pyinstaller. You just need to have pywin32 installed also.