Hi,

First, in order for this to work, make sure you have the 1.1.9 SDK
installed.

If this is the case, perhaps you can post additional code here, and more
environment details?  I've tried running the following handler and it works
perfectly:

from google.appengine.ext import webapp
import urllib2

class MainHandler(webapp.RequestHandler):

  def get(self):
    result = urllib2.urlopen('http://www.google.com')
    self.response.out.write(result.read())

def main():
  application = webapp.WSGIApplication([('/', MainHandler)],
                                       debug=True)
  wsgiref.handlers.CGIHandler().run(application)

Which means either the issue is somewhere else in the handler, or there is
something different in your Python installation.

-Marzia

On Sun, Feb 22, 2009 at 2:22 PM, mark douglas <badoug...@gmail.com> wrote:

>
> does your app actually run as a standalone app on your local/own machine?
>
> let us know...
>
>
> On Sat, Feb 21, 2009 at 12:21 AM, prasy <prasanna2...@gmail.com> wrote:
> >
> > Hello,
> > I was trying to fetch de contents of a site using urlopen command. But
> > i couldn able to do t successfully. Please help me out..
> >
> >  response = urllib2.urlopen(url)
> >  text = response.read()
> >
> > while trying to run this snippet i got de following error..
> >
> > File "C:\Program Files\Google\google_appengine\app\appspot.py", line
> > 45, in getcontent
> >    response = urllib2.urlopen(u)
> >  File "C:\Python25\lib\urllib2.py", line 124, in urlopen
> >    return _opener.open(url, data)
> >  File "C:\Python25\lib\urllib2.py", line 381, in open
> >    response = self._open(req, data)
> >  File "C:\Python25\lib\urllib2.py", line 399, in _open
> >    '_open', req)
> >  File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
> >    result = func(*args)
> >  File "C:\Python25\lib\urllib2.py", line 1107, in http_open
> >    return self.do_open(httplib.HTTPConnection, req)
> >  File "C:\Python25\lib\urllib2.py", line 1081, in do_open
> >    except socket.error, err: # XXX what error?
> > AttributeError: 'module' object has no attribute 'error'
> >
> > wats de error actually? pls help me out..
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to