hi all,
I am trying to send an HTTPS GET request via a button-release script, but get an error which I don’t understand how to work around. I’ve tried looking online and on the forum with no success, except that it appears to be some issue with how Python handles the SSL certificates.
I’ve successfully tested the HTTPS GET request via the URL bar of Internet Explorer on the same machine, and can also successfully send GET requests to HTTP URLs via my script.
Ignition Version: 7.8.3
Operating System: Windows Server 2012
Code
Import urllib2
f = urllib2.urlopen("someURL")
print f.read()
When tested on a simple HTTP URL, the website contents appear in the Output Console.
Error
When tested on HTTPS URLs, the following appears in the output console:
[code]Traceback (most recent call last):
File “event:mouseReleased”, line 2, in
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 124, in urlopen
return _opener.open(url, data)
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 381, in open
response = self._open(req, data)
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 398, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 360, in _call_chain
result = func(*args)
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 1126, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File “C:\Users\ignition.ignition\cache\gw10.4.2.202_8088_8043_main\C0\pylib\urllib2.py”, line 1093, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-1, ‘SSL handshake exception: Differences between the SSL socket behaviour of cpython vs. jython are explained on the wiki: http://wiki.python.org/jython/NewSocketModule#SSL_Support’)>
Ignition v7.8.3 (b2016061017)
Java: Oracle Corporation 1.8.0_92 [/code]
I guess I’m wondering, what’s going on here, and how can I make it work?
Thanks in advance for any responses.