urllib2.urlopen(req) error........

John J. Lee jjl at pobox.com
Sat Jun 5 12:47:38 EDT 2004


John_Dutcher at urmc.rochester.edu (John F Dutcher) writes:

> Can anyone comment on why the code shown in the Python error is in
> some way incorrect...or is there a problem with Python on my hoster's
> site ??
> The highlites don't seem to show here...but line #80 and line # 38 are
> the first line offenders.

So (writing your post for you, here) you've written a CGI script in
Python.  Your script uses urllib2 to POST some data to a server, and
you're including the tracback from cgitb.

>    36         req = urllib2.Request(url='http://www.euromillions.us/scgi-bin/euro8.py',\
>    37         data = strdata)
[...]
> code = 500, msg = 'Internal Server Error', hdrs = <httplib.HTTPMessage
> instance>
[...]

euromillions.us is trying to tell you that euromillions.us is broken
(see RFC 2616, section 10.5.1 '500 Internal Server Error').  Maybe you
tickled the bug in the software running on euromillons.us by POSTing
bad data?

The problem is highly unlikely to be the result of a bug in the Python
library.


John



More information about the Python-list mailing list