[Baypiggies] Why python 3 works on this domain but python 2 crashes

Jeff Chen jeff.chen.urbana at gmail.com
Tue Jun 2 07:42:53 CEST 2015


Hi, Yousuf

I am on Windows 7 Professional, Python 2.7.8.

Attached you can find the dialog when Python crashes. I run the python
program from Windows command line.

I also tested it on another Windows 7 Professional machine which runs
Python 2.7.9. I got following error


*"<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:581)>"*

Did you get the same error?

Thanks,
Jeff
On Mon, Jun 1, 2015 at 9:31 PM, Yousuf Fauzan <yousuffauzan at gmail.com>
wrote:

> Unable to reproduce in Python 2.7.9
>
> *Python 2.7.9 (default, Jan  7 2015, 11:49:12) *
>
> *[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin*
>
> I tried it on one of my servers too
>
> *Python 2.7.3 (default, Feb 27 2014, 19:58:35) *
>
> *[GCC 4.6.3] on linux2*
>
>
> Could you be more specific about the "crash" part? Also the exact version
> and OS.
>
> --
>
> Yousuf
>
> On Mon, Jun 1, 2015 at 9:12 PM Jeff Chen <jeff.chen.urbana at gmail.com>
> wrote:
>
>> Hi there,
>>
>> I am encountering a strange issue on python.
>>
>> I am trying to make a HTTP request to following domain and get response: *https://order.dominos.com
>> <https://order.dominos.com>*
>>
>> 1) When I use python 3, I used following code
>>
>>
>> *import urllib.requesturl = "https://order.dominos.com
>> <https://order.dominos.com>"urllib.request.urlopen(url).read()*
>>
>> 2) When I use python 2, I used following code
>>
>>
>> *import urllib2url="https://order.dominos.com
>> <https://order.dominos.com>"urllib2.urlopen(url).read()*
>>
>> The code for Python 3 worked well, but the code for Python 2 crashed the
>> program. Both programs worked well on any other domains that I tried.
>> Can anyone tell me why and how can I address this issue in Python 2?
>>
>> Really appreciate any of your help.
>>
>> Thanks,
>> Jeff
>>
>> _______________________________________________
>> Baypiggies mailing list
>> Baypiggies at python.org
>> To change your subscription options or unsubscribe:
>> https://mail.python.org/mailman/listinfo/baypiggies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150601/f592293b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-urllib2.png
Type: image/png
Size: 7009 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20150601/f592293b/attachment-0001.png>


More information about the Baypiggies mailing list