from google.appengine.api import urlfetch_stub
Am Samstag, 30. März 2013 02:15:00 UTC-7 schrieb Venkatesh Shukla:
>
> I got this as response ... What should I do??
>
> Traceback (most recent call last):
> File "<pyshell#6>", line 1, in <module>
>
> apiproxy_stub_map.apiproxy.RegisterStub('urlfetch',urlfetch_stub.URLFetchServiceStub())
> NameError: name 'urlfetch_stub' is not defined
>
> On Wednesday, 9 April 2008 00:41:33 UTC+5:30, ryan wrote:
>>
>> It looks like you're trying to use urlfetch from the interactive
>> shell. The Google App Engine modules need a little extra setup before
>> they can be used outside of dev_appserver. Try running this first:
>>
>> from google.appengine.api import apiproxy_stub_map
>>
>> apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
>> apiproxy_stub_map.apiproxy.RegisterStub('urlfetch',
>> urlfetch_stub.URLFetchServiceStub())
>>
>>
>> If you want to use other APIs, you'll need to do similar setup for
>> them:
>>
>> from google.appengine.api import datastore_file_stub
>> from google.appengine.api import mail_stub
>> from google3.apphosting.api import user_service_stub
>>
>> apiproxy_stub_map.apiproxy.RegisterStub('user',
>> user_service_stub.UserServiceStub())
>> apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3',
>> datastore_file_stub.DatastoreFileStub('your_app_id', '/dev/null', '/
>> dev/null'))
>> apiproxy_stub_map.apiproxy.RegisterStub('mail',
>> mail_stub.MailServiceStub())
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.