getting a URL

johnvert at my-deja.com johnvert at my-deja.com
Fri Jun 9 20:11:14 EDT 2000


In article
<BBF4FD9CA76E9DF9.BC74420340D17532.6B7363F9B8212DF1 at lp.airnews.net>,
  Jeremy Hylton <jeremy at beopen.com> wrote:
> johnvert at my-deja.com writes:
>
> > But nothing is printed.  The problematic line seems to be:
> >
> > url = urllib.urlopen("http://www.server.org/foo.html")
> >
> > But the URL I gave it in the actual program is correct.  I tried a
few.
> > If I run this on the shell (it's meant to be a cgi) it raises
IOError
> > sayin 'network unreachable'.  What could be wrong?
>
> The network is unreachable <wink>.  The error message means that the
> operating system could not figure out how to deliver packets to the
> address you used.  Where you able to load the URL using your Web
> browser?  I would guess that your network connection had some problem,
> or that the end site was unreachable.

I gave it the URL of the server I was testing it on, which was
available.  And then I tried the URL they gave in the python.org in the
examples, and URLs of other sites which I know work like slashdot.org,
freshmeat.net, microsoft.com, netscape.com, etc.. same thing.  Is my
code at least correct?

Thanks,
--
John Vert
[insert witty computing joke here]


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list