I'm building an application in python 3.3 which uses the requests library. When I try to get a URL with SSL connection I want to verify it with verify = true. This works perfectly when running my python scripts.
When I freeze the same scripts it crashes. It misses something and I really cant figure out how to integrate it in my frozen application.
I get the following error (which also triggers other errors, but I don't post them here):
Traceback (most recent call last):
File "C:\Python33-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 422, in urlopen
body=body, headers=headers)
File "C:\Python33-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 274, in _make_request
conn.request(method, url, **httplib_request_kw)
File "C:\Python33-32\lib\http\client.py", line 1049, in request
self._send_request(method, url, body, headers)
File "C:\Python33-32\lib\http\client.py", line 1087, in _send_request
self.endheaders(body)
File "C:\Python33-32\lib\http\client.py", line 1045, in endheaders
self._send_output(message_body)
File "C:\Python33-32\lib\http\client.py", line 890, in _send_output
self.send(msg)
File "C:\Python33-32\lib\http\client.py", line 828, in send
self.connect()
File "C:\Python33-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 105, in connect
ssl_version=self.ssl_version)
File "C:\Python33-32\lib\site-packages\requests\packages\urllib3\util.py", line 281, in ssl_wrap_socket
context.load_verify_locations(ca_certs)
FileNotFoundError: [Errno 2] No such file or directory
It seems that ca_certs is missing. There is a file called cacert.pem in the requests library, but I don't know if this is the missing file and how to import it since it seems to be not integrated into my final frozen package.