from scrapy import optional_features

166 views
Skip to first unread message

ScrapMe

unread,
Jul 17, 2012, 12:50:01 PM7/17/12
to scrapy...@googlegroups.com
I have installed pyOpenSSL on my x64 windows 7 machine.

But every time I try to access a 'https' website I get the error

HTTPS not supported: install pyopenssl library

If you traceback the error this is where it is coming from:

scrapy\core\downloader\handlers\http.py", line 34, in _connect
            raise NotSupported("HTTPS not supported: install pyopenssl library")

I look up http.py and find this:

from scrapy import optional_features

ssl_supported = 'ssl' in optional_features
if ssl_supported:
    from twisted.internet.ssl import ClientContextFactory

When I go look for optional_features to add the path of pyopenssl I cannot find it.

Where is the optional_features file?
The idea was to find the file and add the path.

Is this a right way to go about this?
Any suggestions?

Steven Almeroth

unread,
Jul 18, 2012, 11:35:48 AM7/18/12
to scrapy...@googlegroups.com
optional_features is not a file, according to the code

  # optional_features is a set containing Scrapy optional features
  optional_features = set()

  try:
      import OpenSSL
  except ImportError:
      pass
  else:
      optional_features.add('ssl')

Apparently Scrapy can't find OpenSSL.  Open a shell with "scrapy shell" and execute `import OpenSSL`.  Does that work?

ScrapMe

unread,
Jul 18, 2012, 12:18:16 PM7/18/12
to scrapy...@googlegroups.com
No.

I get the following error:
ImportError: DLL load failed: %1 is not a valid Win32 application.

I understand this to be because python is x64 and the application is x32.
I do have OpenSSLx64 install

I went here:
https://launchpad.net/pyopenssl/+download

and currently attempting to install with mingw64 but can't seem to get it going.

Any suggestions?

ScrapMe

unread,
Jul 18, 2012, 12:41:42 PM7/18/12
to scrapy...@googlegroups.com
Note:

I removed previous pyopenssl and did this:

pip install pyopenssl

But then I get a very long error message with this at the bottom:

error: command 'cc' failed with exit status 1

Enix Shen

unread,
Jul 18, 2012, 9:29:16 PM7/18/12
to scrapy...@googlegroups.com
Nothing can be figured out by the bottom of error message you provided below.

Please show me the beginning of that long error message.

Thanks,
Enix

--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/scrapy-users/-/3Yp5JaPb6JsJ.

To post to this group, send email to scrapy...@googlegroups.com.
To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scrapy-users?hl=en.

ScrapMe

unread,
Jul 18, 2012, 10:47:22 PM7/18/12
to scrapy...@googlegroups.com
Here you go:
http://pastebin.com/kDYftFhv


On Wednesday, July 18, 2012 9:29:16 PM UTC-4, Enix Shen wrote:
Nothing can be figured out by the bottom of error message you provided below.

Please show me the beginning of that long error message.

Thanks,
Enix

To unsubscribe from this group, send email to scrapy-users+unsubscribe@googlegroups.com.

ScrapMe

unread,
Jul 20, 2012, 11:42:18 AM7/20/12
to scrapy...@googlegroups.com
Any ideas?

Enix Shen

unread,
Jul 22, 2012, 9:48:06 PM7/22/12
to scrapy...@googlegroups.com
Looks like you use python2.7, could you try python2.6.

To view this discussion on the web visit https://groups.google.com/d/msg/scrapy-users/-/yMHlegkT6PMJ.

To post to this group, send email to scrapy...@googlegroups.com.
To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages