Python py2exe & ldquo; IOError & hellip; unknown URL type: https & rdquo; problem


So my Web Scrapper works fine when ran with IDLE/Python, but when I compile it into a single .exe file (using py2exe), it raises an IOError.

When using urllib module:

IOError: [Errno url error] unknown url type: 'https'

When using requests module:

requests.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

I did notice, when compiling with py2exe, it said at the end that several "modules appear to be missing", including a OpenSSL.SSL, and several references to urllib, which might be the problem?

Any ideas, solutions...?

Can you check if you have openssl installed on your Windows machine? openssl is an open source cryptographic library which is used by most *nix systems. I believe that requests and urllib uses the same underlying library.

Once you fix this and then compile, I'm hoping the errors go away.

Note: I am not fully familiar with how you can do it and I do not own a Windows machine to test some of the articles I found via Google search.