Python interpreter seg fault....

Web hosting discussion, programming, and shared and dedicated servers.
3 posts Page 1 of 1
by dja » Thu Nov 03, 2011 11:40 pm
I'm getting a weird error in the python2.6 interpreter, not sure what's up. FIgured I'd post here to see if I can some good info. Thanks!

$ python2.6
Python 2.6.5 (r265:79063, Jul 15 2010, 10:12:41)
[GCC 3.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cookielib, urllib2
>>> cj = cookielib.CookieJar()
>>> opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
>>> import urllib
>>> data = urllib.urlencode({'pw':'<password>', 'user': '<username>'})
>>> web_file = opener.open("https://members.sonic.net", data) # <-- this is the line that's causing the issue
Segmentation fault
_[Sonic:/home/d/dja]_
$

This same code works from my laptop at home, but not on bolt.sonic.net, I thought maybe it was safeguard against logging into member tools from the command line, but it also seg faults on http://www.gmail.com.
by augie » Wed Nov 16, 2011 5:08 pm
Strace it, I think you'll find that urllib2 doesn't like the SSL certificates for some reason.
by dja » Thu Nov 17, 2011 5:25 pm
Damn, good call! I didn't even think about running strace on it. thanks!
I'll check it out and post the results. I didn't realize at the time that my version of Python is 2.7, but the servers is 2.6 so that might also be part of the issue as to why it works at home but not on the server. Thanks Augie!
3 posts Page 1 of 1

Who is online

In total there are 94 users online :: 0 registered, 0 hidden and 94 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 94 guests