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

Yousuf Fauzan yousuffauzan at gmail.com
Tue Jun 2 06:31:21 CEST 2015


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/20150602/87291a6c/attachment.html>


More information about the Baypiggies mailing list