RE: [google-appengine] TypeError: escape_encode() argument 1 must be str, not unicode

2011-06-20 Thread Brandon Wirtz
Those look like windows errors, is this app deployed?


-Original Message-
From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Taufiq Sunar
Sent: Monday, June 20, 2011 5:10 AM
To: google-appengine@googlegroups.com
Subject: [google-appengine] TypeError: escape_encode() argument 1 must be
str, not unicode

Im trying to make a url shortener using Google URL Shortener API with App
Engine

this is my source code in main.py

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util from xml.dom import minidom
from google.appengine.ext.webapp.util import run_wsgi_app import httplib,
json import cgi

class MainPage(webapp.RequestHandler):
def get(self):
self.response.out.write("""
  
  
  Simple Url Shortener

Url shortener using Google URL Shortener API. Masukkan url yang
pengen dipendekin.
  
Url

  

  """)

class Cari(webapp.RequestHandler):
def post(self): 
url = self.request.get('url')
conn = httplib.HTTPSConnection('www.googleapis.com')
conn.connect();

short = '"'+url+'"'

body = '{"longUrl": %s}' % short
headers = {'content-type':'application/json'}

conn.request('POST', '/urlshortener/v1/url', body, headers)

response = json.loads(conn.getresponse().read())

self.response.out.write('Simple Url
ShortenerUrl yang sudah dipendekin dari ', url, '
:')
self.response.out.write(response["id"])
self.response.out.write('')

application = webapp.WSGIApplication([('/', MainPage), ('/hasil', Cari)],
debug=True)

def main():
run_wsgi_app(application)

if __name__ == '__main__':
main()

and its get error message :

Traceback (most recent call last):
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py",
line 702, in __call__
handler.post(*groups)
  File "D:\latian web\url shortener\main.py", line 55, in post
response = json.loads(conn.getresponse().read())
  File "C:\Program
Files\Google\google_appengine\google\appengine\dist\httplib.py", line 213,
in getresponse
self._allow_truncated, self._follow_redirects)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch.py", line 260,
in fetch
return rpc.get_result()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py",
line 592, in get_result
return self.__get_result_hook(self)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch.py", line 348,
in _get_fetch_result
rpc.check_success()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py",
line 558, in check_success
self.__rpc.CheckSuccess()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_rpc.py",
line 156, in _WaitImpl
self.request, self.response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub.py",
line 87, in MakeSyncCall
method(request, response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch_stub.py",
line 207, in _Dynamic_Fetch
validate_certificate=validate_certificate)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch_stub.py",
line 294, in _RetrieveURL
escaped_payload = payload.encode('string_escape')
TypeError: escape_encode() argument 1 must be str, not unicode

anybody knows what should i do to troubleshoot this?
i use httplib module to make a connection and request.

Best regards,

Taufiq Sunar

--
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.


-- 
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.



[google-appengine] Re: Payment gateway

2011-06-20 Thread Ricky Button
I am using Spreedly  to handle payments. I use it for 
subscriptions, but I'm pretty sure it can handle more than that. It has a 
wonderful REST api and even provides a nice POST callback with customer ids 
when a sale is made so you dont have to poll the server for the invoice.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/H2QgjPz71doJ.
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.



Re: [google-appengine] #appengine irc chat transcript 2011-06-15

2011-06-20 Thread David Mora
My only experience with Mono is playing with Unity3D. What i gather from my
labs is a big backlog of libraries to be ported from .NET FW.
Most noticeable the Enterprise library (that you would obviously look for to
reduce engineering efforts and provide SLAs). I would compare them as CentOS
is to RedHat.

In terms of development MonoDevelop seems to be a really trustful IDE with a
philosophy similar to eclipse (actually, really comfortable)

And the buzz-word around .NET is of course XNA (gaming framework)
http://code.google.com/p/monoxna/ . Although, i heard from our .NET team
that Microsoft might drop it this year.

In terms of deployments and retainer accounts  who knows? i have been
open source since i wrote my first "hello world" 13 years ago :) ... all i
know is something they call "Team Foundation" ;)

On 17 June 2011 22:47, Ikai Lan (Google)  wrote:

> Yikes. Those are great points, David. Thank you for that response. You're
> right; I didn't even think about the multithreading. This would make PHP
> prohibitively expensive. We're aware of the issues this causes for Python
> developers on 2.5, and that's why we've committed to getting multithreading
> for 2.7. This is already a rough job given the expertise we have in Python;
> I can't imagine the black magic we'd need to do to create a multithreaded
> PHP runtime.
>
> My suspicions are the same about the Drupal developers. And yes, it is
> ironic, because something like Drupal works better in a schemaless
> datastore. The point about the open source community flocking to build tools
> is also taken.
>
> No comments about Mono?
>
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>
>
> On Sat, Jun 18, 2011 at 4:03 AM, David Mora  wrote:
>
>> So zend + right scale are playing with a PaaS already, and there's another
>> that i forgot the name (or at least trying to).
>>
>> I worked 5 years on massive PHP systems (+10 mill users, with oracle
>> behind) as SA and from that i gather many things:
>>
>>- Hardware consumed tend to be 1.5 times more than other
>>interpreted/compiled languages
>>- PHP is not multithreaded (you can only fork) which makes the new GAE
>>pricing structure a lot difficult
>>- Naming combinations around the community makes it hard to actually
>>serve PaaS APIs and documentation in a good way and easy to understand 
>> (e.g:
>>the so pseudo called namespaces and lambda functions)
>>- APC or any other solution around code caching is a must for
>>scalability, but it takes a good chunk of server's memory and resources
>>making it more expensive (for large scale systems)
>>- relies a lot on PECL, so lots of low level extensions must be
>>enabled and maintained across SDKs, which potentially would have a
>>portability problem major than what django is right now for python
>>- the most "enterprise" trusted web framework is Zend, known by it's
>>footprint, meaning this a compact web framework must be plugged in.
>>
>> and many more. Although i do love PHP, i would not pick it as a
>> programming language of one of my solutions, it just requires many low level
>> access to adjust it for a deployment
>>
>> On 17 June 2011 10:07, Wilson MacGyver  wrote:
>>
>>> my feeling is, given limited resource, I rather they improve what they
>>> currently
>>> support instead of adding yet another language runtime and hope the
>>> php community will
>>> rally around it.
>>>
>>> there is still plenty of things to do on the GAE-python and GAE-java
>>> side. go was
>>> just added as a new stack.
>>>
>>> google has repetitively said the GAE team is small. I'd rather they
>>> focus on what they
>>> support currently.
>>>
>>> On Fri, Jun 17, 2011 at 11:56 AM, Branko Vukelic 
>>> wrote:
>>> > On Fri, Jun 17, 2011 at 5:24 PM, Wilson MacGyver 
>>> wrote:
>>> >> I don't think supporting php is a game changer.
>>> >>
>>> >> I have a feeling a lot of people that ask about php, wants to slap in
>>> >> wordpress, drupal, etc
>>> >> , run it on google app engine and forget about it.
>>> >>
>>> >> which due to datastore is not going to happen out of the box.
>>> >
>>> > Yeah, but if PHP did make it onto GAE, I'm sure you'd see open-source
>>> > projects that would allow Wordpress and Drupal to run on GAE in a few
>>> > months. Isn't that the whole point?
>>> >
>>> > Anyway, I've seen that it's possible (don't know how well or if it's
>>> > stable enough) to run PHP scripts in JVM.
>>> >
>>> > http://php-java-bridge.sourceforge.net/pjb/
>>> > http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine/
>>> >
>>> >
>>> > --
>>> > Branko Vukelić
>>> > bra...@herdhound.com
>>> >
>>> > Lead Developer
>>> > Herd Hound (tm) - Travel that doesn't bite
>>> > www.herdhound.com
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Gr

[google-appengine] Re: Uploading large file as a part of war

2011-06-20 Thread rishi
Nope. It didn't :(

On Jun 19, 8:40 pm, Renan Mobile  wrote:
> Hi,
> I really don't know, but give a try and tell me if its work. Ok?
> Em 19/06/2011 07:46, "rishi"  escreveu:
>
>
>
>
>
> > Hi,
>
> > Thanks for reply. Does this work for other file formats too? Which are
> > not .jar files?
>
> > Thanks...
>
> > On Jun 18, 12:15 pm, Renan Mobile  wrote:
> > > Hello Rishi,
>
> > > I face this problem and i'm using the follow parameter on the command: *
> > > --enable_jar_splitting*
> > > The full comand:
> > > *appcfg.sh --enable_jar_splitting update war/*
>
> > > Hope this help.
>
> > > 2011/6/17 rishi 
>
> > > > I have written an app and successfully tested it locally with the SDK.
> > > > It uses some large tagger files to tag my data. The size of one file
> > > > goes over 20MB. I need these files in my war to run the app. Locally
> > > > it runs fine as it is a part of my war.
>
> > > > When I try to upload it using" appengine-java-sdk\bin\appcfg.cmd
> > > > update " command, it gives an error and indicates that there is a
> > > > size limit on every file that can be uploaded. (which is 10 MB).
>
> > > > Can ayone tell me what is the solution to this problem?
>
> > > > Thanks.
>
> > > > --
> > > > 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.
>
> > > --
> > > Atenciosamente,
>
> > > -
> > > Presidente Renan Franca
> > > 
> > > Renan Mobile ltda:http://renanmobile.com-Soluções em Dispositivos
> Móveis
> > > (Smartphones) com integração via web.
> > > Soluções em:
> > >         Android (Smartphones);
> > >         Google Web Toolkit (Web);
>
> > --
> > 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.
>
>
>
> - Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
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.



[google-appengine] Need Google Visualization API to work in Intranet

2011-06-20 Thread santosh
Good Morning all,

Hi this is Santosh from India-Hyderabad,



I'm using Google Visualization API in my jsp page which is working
fine in the internet environment.

But at the Client place there is no internet accessible,  as our
application is secure and will run in intranet only.



But as we know Google Visualization will not work in the Intranet
unless provided all the required files to be supplied.

Please let me know the process to download the files in order to run
my application in Intranet also.



Thanking you for your time and consideration.

Kindly help me.



Regards,

Santosh Kumar T,

919393622722.

-- 
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.



[google-appengine] Datastore. Query on Ancestor

2011-06-20 Thread Blaise Gervais
I everyone,

I have a class *GAEDaoSupport* who convert *Object* to *Entity* while
copying properties. I have a JUnit test for this class who check the
conversion and try to store and retrieve values.
When I try to store a *List* of *Entity* where the first is the ancestor and
others are childs I can retrieve all of them by *Key *but a kindless *Query* on
ancestor *Key* return nothing.. I suppose that I'va missed something but
don't now what..

Here is my test case and the output...

> GAEDaoSupport support = *new *GAEDaoSupport(RoleEntity.*class*);
> RoleEntity object = newRelationsEntity();
>
> DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
> List entities = support.createEntity(object);
> System.out.println(" -- [1] Storing "+entities.size()+" entities ---"
> );
> System.out.println(entities);
> List keys = ds.put(entities);
> System.out.println("\t  \\-> Done. Keys : "+keys);
>
> *try *{
> // Pass...
> Entity stored = ds.get(entities.get(0).getKey());
>  assertEquals(entities.get(0), stored);



 // Pass...
> *for *(*final *Entity child : entities.subList(1, entities.size())) {
>  assertEquals(child, ds.get(child.getKey()));
> }
>
>  // Fail !!! , Result is empty
> System.out.println();
>  System.out.println(" -- [2] Retrieving entities by ancestor
> ");
> Query query = new Query()
>  .setAncestor(entities.get(0).getKey());
> System.out.println("\t - Query : "+query);
>
> List childs =
> ds.prepare(query).asList(FetchOptions.Builder.withDefaults());
>  System.out.println("\t  \\-> Done : "+childs);
> } *catch *(EntityNotFoundException e) {
>  fail(e.getMessage());
> }


Output :

>  -- [1] Storing 5 entities ---
> [ system = true
> >
> ,  access = r
> >
> ,   access = w
> >
> ,  enabled = true
>  username = User0
> lastLogin = null
> email = null
>  expiration = null
> password = null
> >
> ,   enabled = true
> username = User1
> lastLogin = null
>  email = null
> expiration = null
> password = null
> >
> ]
>   \-> Done. Keys : [RoleEntity("Role"),
> RoleEntity("Role")/Authorisations(1), RoleEntity("Role")/Authorisations(2),
> RoleEntity("Role")/UserEntity("0"), RoleEntity("Role")/UserEntity("1")]
>


 -- [2] Retrieving entities by ancestor 
>  - Query : SELECT * WHERE __ancestor__ is RoleEntity("Role")
>   \-> Done : []


My test case use a simple *LocalServiceTestHelper *, like described into the
gae documentation :

> *private final* LocalServiceTestHelper helper =
> *new *LocalServiceTestHelper(*new *
> LocalDatastoreServiceTestConfig());

-- 
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.



[google-appengine] TypeError: escape_encode() argument 1 must be str, not unicode

2011-06-20 Thread Taufiq Sunar
Im trying to make a url shortener using Google URL Shortener API with App Engine

this is my source code in main.py

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from xml.dom import minidom
from google.appengine.ext.webapp.util import run_wsgi_app
import httplib, json
import cgi

class MainPage(webapp.RequestHandler):
def get(self):
self.response.out.write("""
  
  
  Simple Url Shortener

Url shortener using Google URL Shortener API. Masukkan url
yang pengen dipendekin.
  
Url

  

  """)

class Cari(webapp.RequestHandler):
def post(self): 
url = self.request.get('url')
conn = httplib.HTTPSConnection('www.googleapis.com')
conn.connect();

short = '"'+url+'"'

body = '{"longUrl": %s}' % short
headers = {'content-type':'application/json'}

conn.request('POST', '/urlshortener/v1/url', body, headers)

response = json.loads(conn.getresponse().read())

self.response.out.write('Simple Url
ShortenerUrl yang sudah dipendekin dari ', url, '
:')
self.response.out.write(response["id"])
self.response.out.write('')

application = webapp.WSGIApplication([('/', MainPage), ('/hasil',
Cari)], debug=True)

def main():
run_wsgi_app(application)

if __name__ == '__main__':
main()

and its get error message :

Traceback (most recent call last):
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py",
line 702, in __call__
handler.post(*groups)
  File "D:\latian web\url shortener\main.py", line 55, in post
response = json.loads(conn.getresponse().read())
  File "C:\Program
Files\Google\google_appengine\google\appengine\dist\httplib.py", line
213, in getresponse
self._allow_truncated, self._follow_redirects)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch.py", line
260, in fetch
return rpc.get_result()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py",
line 592, in get_result
return self.__get_result_hook(self)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch.py", line
348, in _get_fetch_result
rpc.check_success()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py",
line 558, in check_success
self.__rpc.CheckSuccess()
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_rpc.py",
line 156, in _WaitImpl
self.request, self.response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\apiproxy_stub.py",
line 87, in MakeSyncCall
method(request, response)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch_stub.py",
line 207, in _Dynamic_Fetch
validate_certificate=validate_certificate)
  File "C:\Program
Files\Google\google_appengine\google\appengine\api\urlfetch_stub.py",
line 294, in _RetrieveURL
escaped_payload = payload.encode('string_escape')
TypeError: escape_encode() argument 1 must be str, not unicode

anybody knows what should i do to troubleshoot this?
i use httplib module to make a connection and request.

Best regards,

Taufiq Sunar

-- 
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.



Re: [google-appengine] Re: #appengine irc chat transcript 2011-06-15

2011-06-20 Thread Kevin Jackson
Hi,

> ... and I agree with you. But the approach we are taking towards the Python
> 2.7 runtime is something that could theoretically be genericized for other
> runtimes.

That sounds interesting and I guess at a certain point it makes sense
to have a generic runtime rather than implementing a new runtime each
time.

> There are different levels of engagement with external developers we can
> have if there is enough interest. For instance, if a very solid group of
> developers was passionate about bringing a PHP runtime to App Engine and
> demonstrated:
> a. A willingness to roll up their sleeves and slug through some of the hard
> work
> b. The project was more than a throwaway project. That is - there is long
> term viability.
> ... we'd look at some of the various ways we could lower the communication
> barrier between their team and ours. Given our lack of PHP interpreter
> experience on our team, this would, for all practical purposes, be the only
> way for a real PHP runtime to exist on App Engine. We probably wouldn't
> maintain it, but we'd work closely with the folks that do.

What about other language support (Mono/.Net languages are mentioned),
if there is an interest in the community at large - is this a key
metric that is used to look at language support?

Personally I'd like to help out with the python runtime, but my
impression is that there is an extremely high barrier to entry
(probably rightly so) to getting involved here (compared with other
open source projects).

Thanks for the responses - interesting to hear what's coming (and soon
I can upgrade to python2.7)

Kev

-- 
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.



[google-appengine] Re: I have reached 10 AppEngine sites, I really need some more

2011-06-20 Thread Alexander Oleynik
Register new gmail user, register as developer on app engine and get
10 apps. Then invite your real email as a developer/administrator.

On Jun 19, 1:10 pm, Chris Davis  wrote:
> I have reached 10 AppEngine sites, I really need some more, what can I
> do?
>
> Thanks
>
> Chris

-- 
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.



[google-appengine] Strange Index behaviour and proper index strategy

2011-06-20 Thread Alex-S
Hi Google App Engine team,


Lets say I have an Entity with a few properties:

@Entity
public class Animal{

  private String domain;
  private String kingdom;
  private String phylum;
  private String class;
  private String order;
  private String family;
  private String genus;
  private String species;
  private String classifier;

  private Date classifiedDate;
  private Date dateEntered;

  //getters + setters ...

}

If I want to search on say, domain, kingdom, class and dateEntered
with equality google docs suggest I don't need an index, but strangely
on some values - dateEntered = 2007 + any value of the properties I
get
DatastoreNeedIndexException but not for  dateEntered = 2006 or 2008. I
would have expected to get the error for all values where an index was
not in place or no error at all. Have i done something wrong here?

Also is it true that I need to specify an index (ok even auto
generated) for every query where a sort order is specified?

so for instance if I want to query on any domain=something ordered by
classifiedDate descending that's one index:





but if I wanted to query on any domain=something and
kingdom=otherThing ordered by classifiedDate  that would be two
indexs:
   





   





because app engine treats property ordering as important?

I guess I could always order the query properties myself to ensure no
index is duplicated and then for small numbers of properties this
isn't too bad.

If I wanted to optionally search for kingdoms or domains or both
ordered by classifiedDate   the index definition would be








  





But, If I wanted to search on any combination of, say, 3 properties +
an order field this would be some 8 index definitions,

5 properties + an order would mean 32 definitions.

9 entity properties and order on classifiedDate would be some 512(!!)
different index definitions. If I wanted ascending as well as
descending order on classifiedDate  then I have to double that - 1024
definitions. and if I wanted to order on the query (optionally) as
dateEntered  ascending or descending instead then thats double again
-  2048. These seems crazy just to query on 9 difference properties.
Or have I got it badly wrong?

Can I just create the  4 indexes  :
 



   











if I'm doing only equality filters for 9 other fields? Obviously I
don't care about ordering results which will always be
="someEnteredValue".

cheers,
Alex.

-- 
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.



[google-appengine] Re: Authentication problem

2011-06-20 Thread GAE app developer
Sorry Johan.

I will put it in the below mentioned group

On Jun 20, 6:06 pm, Johan Euphrosine  wrote:
> Hi,
>
> This should be discussed 
> onhttp://groups.google.com/group/google-api-python-clientas this is not
> specific toGoogleAppEngine.
>
> Thanks in advance.
>
> On Mon, Jun 20, 2011 at 2:51 PM, GAEappdeveloper
>
>
>
>
>
>
>
>  wrote:
> > from oauth2client.appengine import OAuth2Decorator
>
> > decorator = OAuth2Decorator(
> >  client_id='',
> >  client_secret='',
> >  scope='https://www.googleapis.com/auth/buzz',
> >  user_agent='buzz-appengine-sample/1.0')
>
> > http = httplib2.Http(memcache)
> > service = build("buzz", "v1", http=http)
>
> > class MainHandler(webapp.RequestHandler):
>
> >  @decorator.oauth_required
> >  def get(self):
> >    http = decorator.http()
> >    activities = service.activities()
> >    activitylist = activities.list(scope='@consumption',
> >                                     userId='@me').execute(http)
> >    ...
>
> > def main():
> >  application = webapp.WSGIApplication(
> >      [
> >      ('/', MainHandler),
> >      ],
> >      debug=True)
> >  util.run_wsgi_app(application)
>
> > This is the OAuth Decorator code. In this @decorator.oauth_required
> > gets executed, theproblemis it does not go inside get function. So
> > how to do it.
>
> > What to put in @consumption and @me in the below line
> > activitylist = activities.list(scope='@consumption',
> >                                     userId='@me').execute(http)
>
> > Please help
>
> > On Jun 20, 3:47 pm, Johan Euphrosine  wrote:
> >> You have to use moderator scope:https://www.googleapis.com/auth/moderator
>
> >> As explained in the Moderator API 
> >> documentation:http://code.google.com/apis/moderator/v1/using_rest.html
>
> >> On Mon, Jun 20, 2011 at 11:27 AM, Saurabh S  wrote:
> >> > Thanks Johan,that error has been resolved.
>
> >> > Now after that it says invalid scope.
> >> > Error:OAuth 2.0 error: invalid_scope
>
> >> > Is there any particular URL for scope or I have to manually enter a
> >> > url on a particular basis
>
> >> > Can you please provide information on this
>
> >> > On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
> >> >> Hi Rohit,
>
> >> >> If you are running dev_appserver.py,
>
> >> >> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
> >> >> access section:https://code.google.com/apis/console/
>
> >> >> Contains:http://localhost:8080/oauth2callback
>
> >> >> Note http:// not https://.
>
> >> >> If you are running the deployed version, make sure it 
> >> >> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/...
>
> >> >> Or both depending if you enforce SSL if you application.
>
> >> >> Hope that helps.
>
> >> >> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>
> >> >>  wrote:
> >> >> > Thanks Johan
> >> >> > Even though I have signed in using my Gmail account it does not seem
> >> >> > to make any difference. It is displaying the same error.
>
> >> >> > And also i tried using the oauthdecorator
> >> >> > 1. when I click on yes or no button for a particular submission it
> >> >> > requests for login and after I sign in it displays this error:
> >> >> > OAuth 2.0 error: redirect_uri_mismatch
> >> >> > The redirect URI in the request did not match a registered redirect
> >> >> > URI
>
> >> >> > Can you please tell why this error appears and how to solve this
> >> >> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
> >> >> >> get_current_user() could return None has documented here, if no user
> >> >> >> is logged 
> >> >> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>
> >> >> >> You could also take a look at the new OAuth2Decorator in
> >> >> >>google-api-python-client that make dealing with OAuth 2.0 
> >> >> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>
> >> >> >> I just published an article on how to use it withGoogleTasks API,
> >> >> >> but that should be easy to translate to Moderator 
> >> >> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>
> >> >> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>
> >> >> >>  wrote:
> >> >> >> > Hi,
>
> >> >> >> > I am developing anGoogleappengineapplication using Moderator API
> >> >> >> > in python. I am able to retrieve the submissions. I am having an
> >> >> >> >authenticationproblem. My code runs locally without anyproblembut
> >> >> >> > when I deploy it inGoogleappenginelauncher. It shows the following
> >> >> >> > error:
>
> >> >> >> > 'NoneType' object has no attribute 'user_id'
> >> >> >> > Traceback (most recent call last):
> >> >> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
> >> >> >> > ext/webapp/__init__.py", line 700, in __call__
> >> >> >> >    handler.get(*groups)
> >> >> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
> >> >> >> > retrieve_list_unique.py", line 107, in get
> >> >> >> >    f = Flow.get_by_key_name(user.user_id())
> >> >> >> > Attr

[google-appengine] channel 404

2011-06-20 Thread venkman
We're seeing 404 errors for the following channel api urls:

/_ah/channel/disconnected/
/_ah/channel/connected/
/_ah/channel/error/

Anyone else seeing these or know how to fix them?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/AkhbLX9d6W4J.
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.



[google-appengine] Analytics on a non-HTML response

2011-06-20 Thread Jeff Knox
Is it possible to setup Google Analytics on a Java servlet request
that doesn't return an HTML page? In other words I can setup analytics
on

  www.foo.com

just fine but instead I would like to setup analytics on a servlet
request that returns a JPG image:

  www.foo.com/image?id=1234

Currently I have my App Engine project kicking along and have just
added ananlytics to the web portion. If an image is hotlinked on a
forum I would like to include it in the data. Currently I am
internally tracking the number of views, I would like to use more of
the power of the analytics product.

I don't mind adding code to the servlet, I just haven't found the
right refrence. I see the management API but nothing for tracking.

Thanks,

Jeff

-- 
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.



Re: [google-appengine] Help! Error while using bulkloader!

2011-06-20 Thread Branko Vukelic
This means that the credentials you are using to log in must match one
of the application administrators.

On Tue, Jun 21, 2011 at 4:08 AM, lezizi  wrote:
> Hello,
> I'm a Google App Engine user. I've tried many times to use bulkloader
> to upload my data to the App Engine.
> My OS is Windows 7 and I've set up the Python ssl module. But the
> program doesn't work. It always reports:
>
> Error 401: --- begin server output ---
> You must be logged in as an administrator to access this.
> --- end server output ---
>
> I'm sure I have entered the correct password.
> Can you help me !
>
> Thanks,
> lezizi.
>
> --
> 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.
>
>



-- 
Branko Vukelić
bra...@herdhound.com

Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com

-- 
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.



[google-appengine] Help! Error while using bulkloader!

2011-06-20 Thread lezizi
Hello,
I'm a Google App Engine user. I've tried many times to use bulkloader
to upload my data to the App Engine.
My OS is Windows 7 and I've set up the Python ssl module. But the
program doesn't work. It always reports:

Error 401: --- begin server output ---
You must be logged in as an administrator to access this.
--- end server output ---

I'm sure I have entered the correct password.
Can you help me !

Thanks,
lezizi.

-- 
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.



RE: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Brandon Wirtz
Use a fetch from one thread to another.

Echo Time
Fetch
Echo Time
Do something
Echo Time
Echo Fetch

Now you have a timeline of everything except the latency from User to
Appengine.


-Original Message-
From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Nicholas Verne
Sent: Monday, June 20, 2011 6:03 PM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Why a big difference between execution time
and response time?

Yes, that's true. If you try this:

task_t0 = None

...


def main(argv):
  global task_t0
  task_t0 = time.time()

You'll get a measurement per request as early as we can make it. For warming
requests, it might still be worth measuring the import time

import time
import_start = time.time()
... other imports
import_duration = time.time() - import_start

The import_duration global should persist and tell you how long this
instance's imports took to process. Subsequent requests on that instance
don't do the imports.

Nick Verne

On Tue, Jun 21, 2011 at 10:49 AM, Waleed Abdulla  wrote:
>> A more useful measurement might be to set task_t0 as a global 
>> variable at the top of your file, with only the import of "time" 
>> preceding it
>
> Wouldn't that cause the 2nd, 3rd, ...nth requests to the same handler 
> to show wrong values? I see why setting task_t0 at the top of the file 
> would apply if it was the first request that causes the handler to be 
> loaded. But this is happening on an ongoing basis for all requests, 
> not only the first for that handler.
>
> --
> 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.
>

--
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.


-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Nicholas Verne
Yes, that's true. If you try this:

task_t0 = None

...


def main(argv):
  global task_t0
  task_t0 = time.time()

You'll get a measurement per request as early as we can make it. For
warming requests, it might still be worth measuring the import time

import time
import_start = time.time()
... other imports
import_duration = time.time() - import_start

The import_duration global should persist and tell you how long this
instance's imports took to process. Subsequent requests on that
instance don't do the imports.

Nick Verne

On Tue, Jun 21, 2011 at 10:49 AM, Waleed Abdulla  wrote:
>> A more useful measurement might be to set task_t0 as a global variable
>> at the top of your file, with only the import of "time" preceding it
>
> Wouldn't that cause the 2nd, 3rd, ...nth requests to the same handler to
> show wrong values? I see why setting task_t0 at the top of the file would
> apply if it was the first request that causes the handler to be loaded. But
> this is happening on an ongoing basis for all requests, not only the first
> for that handler.
>
> --
> 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.
>

-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Waleed Abdulla
>
> A more useful measurement might be to set task_t0 as a global variable
> at the top of your file, with only the import of "time" preceding it
>

Wouldn't that cause the 2nd, 3rd, ...nth requests to the same handler to
show wrong values? I see why setting task_t0 at the top of the file would
apply if it was the first request that causes the handler to be loaded. But
this is happening on an ongoing basis for all requests, not only the first
for that handler.

-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Nicholas Verne
A more useful measurement might be to set task_t0 as a global variable
at the top of your file, with only the import of "time" preceding it

import time
task_t0 = time.time()

... other imports
... code

A lot of things happen before your post() handler. Not just imports
but potentially the registration of wsgi handlers and so on.

Nick Verne

On Tue, Jun 21, 2011 at 10:04 AM, Waleed Abdulla  wrote:
> Thanks, Nick. I guess I assumed the issue is not in my code so didn't find a
> need to include more details. That, obviously, is a bad assumption, so here
> is more details:
> I'm using Python. I'm calculating the time in my code as follows:
>   def post(self):
>     task_t0 = time.time()
>     logging.info("start task")
>      code of the method 
>     logging.info("time to finish task: %r seconds", time.time() - task_t0)
>   # last line in the function
>
> Regards,
> Waleed
>
>
>
> On Mon, Jun 20, 2011 at 3:29 PM, Nicholas Verne  wrote:
>>
>> Waleed,
>>
>> It's hard to make suggestions without knowing whether this is a Java
>> or Python app, or where in your code the "start_time" measurement is
>> taken.
>>
>> In the case of a Python app, if you have import statements before you
>> set start_time, then it is probably those imports that are taking up
>> the excess time.
>>
>> Nick Verne
>>
>> On Tue, Jun 21, 2011 at 6:32 AM, Renan Mobile
>>  wrote:
>> > Interesting... i really know why. Because u use less CPU then google
>> > shows.
>> > Will u pay for the 10seconds or for 0.8?
>> >
>> > Em 20/06/2011 15:53, "Waleed Abdulla"  escreveu:
>> >> I've been having a hard time getting GAE to run my taskqueue tasks as
>> >> fast
>> >> as I want them to run (described it in a previous thread). Part of my
>> >> research, I put a timer in my code to see how long each part of my code
>> >> takes. I noticed that while the task takes 0.8 seconds to run, the
>> >> actual
>> >> processing time as shown in GAE logs goes up to 10 seconds (see
>> >> attached
>> >> screen shot). Why such a big difference? And what's happening in that
>> >> time?
>> >>
>> >> Waleed
>> >>
>> >> --
>> >> 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.
>> >>
>> >
>> > --
>> > 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.
>> >
>>
>> --
>> 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.
>>
>
> --
> 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.
>

-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Waleed Abdulla
Thanks, Nick. I guess I assumed the issue is not in my code so didn't find a
need to include more details. That, obviously, is a bad assumption, so here
is more details:

I'm using Python. I'm calculating the time in my code as follows:

  def post(self):
*task_t0 = time.time()*
logging.info("start task")

 code of the method 

*logging.info("time to finish task: %r seconds", time.time() - task_t0)
# last line in the function*


Regards,
Waleed




On Mon, Jun 20, 2011 at 3:29 PM, Nicholas Verne  wrote:

> Waleed,
>
> It's hard to make suggestions without knowing whether this is a Java
> or Python app, or where in your code the "start_time" measurement is
> taken.
>
> In the case of a Python app, if you have import statements before you
> set start_time, then it is probably those imports that are taking up
> the excess time.
>
> Nick Verne
>
> On Tue, Jun 21, 2011 at 6:32 AM, Renan Mobile
>  wrote:
> > Interesting... i really know why. Because u use less CPU then google
> shows.
> > Will u pay for the 10seconds or for 0.8?
> >
> > Em 20/06/2011 15:53, "Waleed Abdulla"  escreveu:
> >> I've been having a hard time getting GAE to run my taskqueue tasks as
> fast
> >> as I want them to run (described it in a previous thread). Part of my
> >> research, I put a timer in my code to see how long each part of my code
> >> takes. I noticed that while the task takes 0.8 seconds to run, the
> actual
> >> processing time as shown in GAE logs goes up to 10 seconds (see attached
> >> screen shot). Why such a big difference? And what's happening in that
> >> time?
> >>
> >> Waleed
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>

-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Nicholas Verne
Waleed,

It's hard to make suggestions without knowing whether this is a Java
or Python app, or where in your code the "start_time" measurement is
taken.

In the case of a Python app, if you have import statements before you
set start_time, then it is probably those imports that are taking up
the excess time.

Nick Verne

On Tue, Jun 21, 2011 at 6:32 AM, Renan Mobile
 wrote:
> Interesting... i really know why. Because u use less CPU then google shows.
> Will u pay for the 10seconds or for 0.8?
>
> Em 20/06/2011 15:53, "Waleed Abdulla"  escreveu:
>> I've been having a hard time getting GAE to run my taskqueue tasks as fast
>> as I want them to run (described it in a previous thread). Part of my
>> research, I put a timer in my code to see how long each part of my code
>> takes. I noticed that while the task takes 0.8 seconds to run, the actual
>> processing time as shown in GAE logs goes up to 10 seconds (see attached
>> screen shot). Why such a big difference? And what's happening in that
>> time?
>>
>> Waleed
>>
>> --
>> 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.
>>
>
> --
> 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.
>

-- 
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.



Re: [google-appengine] Payment gateway

2011-06-20 Thread kowsik
We've been playing with Brain Tree which does have a pretty nice API:

http://www.braintreepayments.com/docs/python

And +1 to Brandon's "meta" gateway suggestion. Store things like
invoice-ids in your own database on a per-account basis instead of
having to hit the payment gateway all the time. Scales much better.

K.
---
http://blitz.io
http://twitter.com/pcapr
http://labs.mudynamics.com

On Mon, Jun 20, 2011 at 1:43 PM, Branko Vukelic  wrote:
> Thanks for the tip, Brandon. I'll look into this option, then.
>
> On Mon, Jun 20, 2011 at 10:33 PM, Brandon Wirtz  wrote:
>> I would for lots of reasons. Use a "meta" gate way.   Using a "proxy" built 
>> in another language handle your payments and send the response to GAE. The 
>> 10 second limit on GAE Fetch will often make payment gateways time out.
>> You are better to Use an ajax element on the page, do the submit to your 
>> other platform, and when the payment is approved have it update a data field 
>> so that the Ajax which has been polling every 500ms can say "confirmed" or 
>> "declined"
>>
>>
>> -Original Message-
>> From: google-appengine@googlegroups.com 
>> [mailto:google-appengine@googlegroups.com] On Behalf Of Branko Vukelic
>> Sent: Monday, June 20, 2011 12:55 PM
>> To: google-appengine@googlegroups.com
>> Subject: [google-appengine] Payment gateway
>>
>> Can anyone recommend a payment gateway that offers Python SDK that would 
>> work on GAE? I've looked at a few but so far Python SDK is either not 
>> offered at all, or offered with C-based code/dependencies.
>> If there's no such a solution, what payment gateway would you recommend that 
>> possibly has nice JSON or REST API?
>>
>> --
>> Branko Vukelić
>> bra...@herdhound.com
>>
>> Lead Developer
>> Herd Hound (tm) - Travel that doesn't bite www.herdhound.com
>>
>> --
>> 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.
>>
>>
>> --
>> 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.
>>
>>
>
>
>
> --
> Branko Vukelić
> bra...@herdhound.com
>
> Lead Developer
> Herd Hound (tm) - Travel that doesn't bite
> www.herdhound.com
>
> --
> 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.
>
>

-- 
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.



Re: [google-appengine] Datastore Admin shows nothing even though the Data Viewer shows data

2011-06-20 Thread Ross M Karchner
are you using namespaces?

On Mon, Jun 20, 2011 at 3:03 PM, Christian  wrote:

> I'd like to use the Datastore Admin to clear out the datastore, but it
> comes up empty. There's clearly data in there, so what's wrong here?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/_0_0sHiBEcwJ.
> 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.
>



-- 
Ross M Karchner

-- 
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.



Re: [google-appengine] Payment gateway

2011-06-20 Thread Branko Vukelic
Thanks for the tip, Brandon. I'll look into this option, then.

On Mon, Jun 20, 2011 at 10:33 PM, Brandon Wirtz  wrote:
> I would for lots of reasons. Use a "meta" gate way.   Using a "proxy" built 
> in another language handle your payments and send the response to GAE. The 10 
> second limit on GAE Fetch will often make payment gateways time out.
> You are better to Use an ajax element on the page, do the submit to your 
> other platform, and when the payment is approved have it update a data field 
> so that the Ajax which has been polling every 500ms can say "confirmed" or 
> "declined"
>
>
> -Original Message-
> From: google-appengine@googlegroups.com 
> [mailto:google-appengine@googlegroups.com] On Behalf Of Branko Vukelic
> Sent: Monday, June 20, 2011 12:55 PM
> To: google-appengine@googlegroups.com
> Subject: [google-appengine] Payment gateway
>
> Can anyone recommend a payment gateway that offers Python SDK that would work 
> on GAE? I've looked at a few but so far Python SDK is either not offered at 
> all, or offered with C-based code/dependencies.
> If there's no such a solution, what payment gateway would you recommend that 
> possibly has nice JSON or REST API?
>
> --
> Branko Vukelić
> bra...@herdhound.com
>
> Lead Developer
> Herd Hound (tm) - Travel that doesn't bite www.herdhound.com
>
> --
> 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.
>
>
> --
> 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.
>
>



-- 
Branko Vukelić
bra...@herdhound.com

Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com

-- 
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.



RE: [google-appengine] Payment gateway

2011-06-20 Thread Brandon Wirtz
I would for lots of reasons. Use a "meta" gate way.   Using a "proxy" built in 
another language handle your payments and send the response to GAE. The 10 
second limit on GAE Fetch will often make payment gateways time out.
You are better to Use an ajax element on the page, do the submit to your other 
platform, and when the payment is approved have it update a data field so that 
the Ajax which has been polling every 500ms can say "confirmed" or "declined" 


-Original Message-
From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of Branko Vukelic
Sent: Monday, June 20, 2011 12:55 PM
To: google-appengine@googlegroups.com
Subject: [google-appengine] Payment gateway

Can anyone recommend a payment gateway that offers Python SDK that would work 
on GAE? I've looked at a few but so far Python SDK is either not offered at 
all, or offered with C-based code/dependencies.
If there's no such a solution, what payment gateway would you recommend that 
possibly has nice JSON or REST API?

--
Branko Vukelić
bra...@herdhound.com

Lead Developer
Herd Hound (tm) - Travel that doesn't bite www.herdhound.com

--
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.


-- 
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.



Re: [google-appengine] Why a big difference between execution time and response time?

2011-06-20 Thread Renan Mobile
Interesting... i really know why. Because u use less CPU then google shows.
Will u pay for the 10seconds or for 0.8?
Em 20/06/2011 15:53, "Waleed Abdulla"  escreveu:
> I've been having a hard time getting GAE to run my taskqueue tasks as fast
> as I want them to run (described it in a previous thread). Part of my
> research, I put a timer in my code to see how long each part of my code
> takes. I noticed that while the task takes 0.8 seconds to run, the actual
> processing time as shown in GAE logs goes up to 10 seconds (see attached
> screen shot). Why such a big difference? And what's happening in that
time?
>
> Waleed
>
> --
> 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.
>

-- 
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.



[google-appengine] Payment gateway

2011-06-20 Thread Branko Vukelic
Can anyone recommend a payment gateway that offers Python SDK that
would work on GAE? I've looked at a few but so far Python SDK is
either not offered at all, or offered with C-based code/dependencies.
If there's no such a solution, what payment gateway would you
recommend that possibly has nice JSON or REST API?

-- 
Branko Vukelić
bra...@herdhound.com

Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com

-- 
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.



[google-appengine] Re: High Latency (~1500 ms)

2011-06-20 Thread Fabiant7t
After deploying the same code as a new version (forcing the instances
to refresh), everything seems to work fine again:

Total number of instances: 10 total (3 Resident)
Average QPS*: 0.517
Average Latency*: 229.8 ms
Average Memory: 28.4 MBytes

Best regards,
Fabian

-- 
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.



[google-appengine] Datastore Admin shows nothing even though the Data Viewer shows data

2011-06-20 Thread Christian
I'd like to use the Datastore Admin to clear out the datastore, but it comes 
up empty. There's clearly data in there, so what's wrong here?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/_0_0sHiBEcwJ.
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.



Re: [google-appengine] Re: Indexes stuck in deleting/error state - urgent

2011-06-20 Thread Waleed Abdulla
Has anyone had luck getting their problems addressed after posting to the
issue tracker? Looking at the top "issues", it looks like it's used mostly
for feature requests. And there are many "new" issues back from 2009. What's
your experience?




On Mon, Jun 20, 2011 at 11:29 AM, Barry Hunter wrote:

> Did you file a production issue ticket?
>
>
> http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue
>
>
> On Mon, Jun 20, 2011 at 6:04 PM, Lenny Rachitsky wrote:
>
>> Any way someone can take a look at this? It's been 4 days now.
>>
>> On Jun 17, 8:51 pm, Lenny Rachitsky  wrote:
>> > I've got two indexes in error state, one in "deleting" state (https://
>> > skitch.com/lennysan/ffkuf/data-store-indexes-localmind) . I've
>> > followed the instructions to vacuum and re-index, but nothing seems to
>> > be working. This is bringing down parts of my application, so any
>> > immediate help would be much appreciated.
>> >
>> > app id: reconplatform
>> >
>> > Thanks in advance,
>> > Lenny
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>

-- 
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.



[google-appengine] Re: Indexes stuck in deleting/error state - urgent

2011-06-20 Thread Lenny Rachitsky
Well that's good to know about :)

Thanks Barry.

On Jun 20, 6:29 pm, Barry Hunter  wrote:
> Did you file a production issue ticket?
>
> http://code.google.com/p/googleappengine/issues/entry?template=Produc...
>
>
>
>
>
>
>
> On Mon, Jun 20, 2011 at 6:04 PM, Lenny Rachitsky  wrote:
> > Any way someone can take a look at this? It's been 4 days now.
>
> > On Jun 17, 8:51 pm, Lenny Rachitsky  wrote:
> > > I've got two indexes in error state, one in "deleting" state (https://
> > > skitch.com/lennysan/ffkuf/data-store-indexes-localmind) . I've
> > > followed the instructions to vacuum and re-index, but nothing seems to
> > > be working. This is bringing down parts of my application, so any
> > > immediate help would be much appreciated.
>
> > > app id: reconplatform
>
> > > Thanks in advance,
> > > Lenny
>
> > --
> > 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.

-- 
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.



[google-appengine] Re: Task queue not scaling up!

2011-06-20 Thread stevep
It is vitally important that developers get a better sense of what
affects task queue delays**. TQs are extremely important IMHO for
maintaining low latency of the on-line handler. Yet there *must* be
some predictability regarding task delays for at least one queue. If
this already exists, point me to the docs Please!

cheers,
stevep

** - I've given up any hope of seeing a separate, high-reliability,
low-volume queue. Now just hoping to gain some specifics from Google
about how to predict TQ performance. Until then, we have Robert who I
can't thank enough for his on-going help in these forums.

-- 
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.



[google-appengine] High Latency (~1500 ms)

2011-06-20 Thread Fabiant7t
Hi,

our Python instances serve requests with an average latency of about
1500ms at the moment. Having a look at the instances, the new ones
seem to have a really short lifespan while keeping about the same
amount of instances.

Our app ID is 'spiegeltvapp', serves German content (Most requests are
from Germany and Austria) and here are the current stats:
Number of instances: 19, 3 resident
Average QPS: 0.269
Average Latency: 1527.5ms
Average Memory: 31.7 MBytes

Best regards,
Fabian

-- 
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.



Re: [google-appengine] Re: Indexes stuck in deleting/error state - urgent

2011-06-20 Thread Barry Hunter
Did you file a production issue ticket?

http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue

On Mon, Jun 20, 2011 at 6:04 PM, Lenny Rachitsky  wrote:

> Any way someone can take a look at this? It's been 4 days now.
>
> On Jun 17, 8:51 pm, Lenny Rachitsky  wrote:
> > I've got two indexes in error state, one in "deleting" state (https://
> > skitch.com/lennysan/ffkuf/data-store-indexes-localmind) . I've
> > followed the instructions to vacuum and re-index, but nothing seems to
> > be working. This is bringing down parts of my application, so any
> > immediate help would be much appreciated.
> >
> > app id: reconplatform
> >
> > Thanks in advance,
> > Lenny
>
> --
> 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.
>
>

-- 
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.



[google-appengine] Re: Indexes stuck in deleting/error state - urgent

2011-06-20 Thread Lenny Rachitsky
Any way someone can take a look at this? It's been 4 days now.

On Jun 17, 8:51 pm, Lenny Rachitsky  wrote:
> I've got two indexes in error state, one in "deleting" state (https://
> skitch.com/lennysan/ffkuf/data-store-indexes-localmind) . I've
> followed the instructions to vacuum and re-index, but nothing seems to
> be working. This is bringing down parts of my application, so any
> immediate help would be much appreciated.
>
> app id: reconplatform
>
> Thanks in advance,
> Lenny

-- 
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.



[google-appengine] Re: 1.5.1 SDK Prerelease

2011-06-20 Thread Owen Powell

>
> - Datanucleus now supports polymorphic relationships.
>   http://code.google.com/p/datanucleus-appengine/issues/detail?id=153
>

Can anyone explain to me how to use this? I've got a simple example that 
doesn't work (see below). Sofa extends Furniture, but when I try to persist 
a collection of furniture in a House, I get the following:

"java.lang.UnsupportedOperationException: Received a child of type 
modeltest.server.Sofa for a field of type modeltest.server.Furniture. 
 Unfortunately polymorphism in relationships is not yet supported."

I'm using the 1.5.1 SDK.

// imports
@PersistenceCapable
public class House {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = 
"true")
String id;

@Persistent ArrayList furniture;
 House() {
furniture = new ArrayList();
furniture.add(new Sofa());
}

}

// imports...
@PersistenceCapable
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class Furniture {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = 
"true")
String id;

}

// imports
@PersistenceCapable
public class Sofa extends Furniture {

}

Best,

~Owen


> -- 
> Johan Euphrosine (proppy)
> Developer Programs Engineer
> Google Developer Relations
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/XZVgvet2QhgJ.
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.



[google-appengine] Re: Version 1.5.1 not available on the download page

2011-06-20 Thread Michael
You can get the prerelease zip file at:
http://code.google.com/p/googleappengine/downloads/list

Though you might wait a bit. See problems at:
https://groups.google.com/forum/?fromgroups#!topic/google-appengine/dnpEaiRvxuQ

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/rvo3SiKKCNQJ.
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.



[google-appengine] Templates and filters

2011-06-20 Thread walter
Hello everyone!

I have upgraded templates from django 0.96 to django 1.2. Accordingly
I want to use filters "markdown" or "textile" in my work. Is there any
possibility for this? I don't use django-helper or something another
one, only App Engine.

-- 
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.



Re: [google-appengine] Re: Authentication problem

2011-06-20 Thread Johan Euphrosine
Hi,

This should be discussed on
http://groups.google.com/group/google-api-python-client as this is not
specific to Google App Engine.

Thanks in advance.

On Mon, Jun 20, 2011 at 2:51 PM, GAE app developer
 wrote:
> from oauth2client.appengine import OAuth2Decorator
>
> decorator = OAuth2Decorator(
>  client_id='',
>  client_secret='',
>  scope='https://www.googleapis.com/auth/buzz',
>  user_agent='buzz-appengine-sample/1.0')
>
> http = httplib2.Http(memcache)
> service = build("buzz", "v1", http=http)
>
> class MainHandler(webapp.RequestHandler):
>
>  @decorator.oauth_required
>  def get(self):
>    http = decorator.http()
>    activities = service.activities()
>    activitylist = activities.list(scope='@consumption',
>                                     userId='@me').execute(http)
>    ...
>
> def main():
>  application = webapp.WSGIApplication(
>      [
>      ('/', MainHandler),
>      ],
>      debug=True)
>  util.run_wsgi_app(application)
>
> This is the OAuth Decorator code. In this @decorator.oauth_required
> gets executed, the problem is it does not go inside get function. So
> how to do it.
>
> What to put in @consumption and @me in the below line
> activitylist = activities.list(scope='@consumption',
>                                     userId='@me').execute(http)
>
> Please help
>
> On Jun 20, 3:47 pm, Johan Euphrosine  wrote:
>> You have to use moderator scope:https://www.googleapis.com/auth/moderator
>>
>> As explained in the Moderator API 
>> documentation:http://code.google.com/apis/moderator/v1/using_rest.html
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Jun 20, 2011 at 11:27 AM, Saurabh S  wrote:
>> > Thanks Johan,that error has been resolved.
>>
>> > Now after that it says invalid scope.
>> > Error:OAuth 2.0 error: invalid_scope
>>
>> > Is there any particular URL for scope or I have to manually enter a
>> > url on a particular basis
>>
>> > Can you please provide information on this
>>
>> > On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
>> >> Hi Rohit,
>>
>> >> If you are running dev_appserver.py,
>>
>> >> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
>> >> access section:https://code.google.com/apis/console/
>>
>> >> Contains:http://localhost:8080/oauth2callback
>>
>> >> Note http:// not https://.
>>
>> >> If you are running the deployed version, make sure it 
>> >> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/...
>>
>> >> Or both depending if you enforce SSL if you application.
>>
>> >> Hope that helps.
>>
>> >> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>>
>> >>  wrote:
>> >> > Thanks Johan
>> >> > Even though I have signed in using my Gmail account it does not seem
>> >> > to make any difference. It is displaying the same error.
>>
>> >> > And also i tried using the oauthdecorator
>> >> > 1. when I click on yes or no button for a particular submission it
>> >> > requests for login and after I sign in it displays this error:
>> >> > OAuth 2.0 error: redirect_uri_mismatch
>> >> > The redirect URI in the request did not match a registered redirect
>> >> > URI
>>
>> >> > Can you please tell why this error appears and how to solve this
>> >> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
>> >> >> get_current_user() could return None has documented here, if no user
>> >> >> is logged 
>> >> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>>
>> >> >> You could also take a look at the new OAuth2Decorator in
>> >> >>google-api-python-client that make dealing with OAuth 2.0 
>> >> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>>
>> >> >> I just published an article on how to use it withGoogleTasks API,
>> >> >> but that should be easy to translate to Moderator 
>> >> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>>
>> >> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>>
>> >> >>  wrote:
>> >> >> > Hi,
>>
>> >> >> > I am developing anGoogleappengineapplication using Moderator API
>> >> >> > in python. I am able to retrieve the submissions. I am having an
>> >> >> >authenticationproblem. My code runs locally without anyproblembut
>> >> >> > when I deploy it inGoogleappenginelauncher. It shows the following
>> >> >> > error:
>>
>> >> >> > 'NoneType' object has no attribute 'user_id'
>> >> >> > Traceback (most recent call last):
>> >> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
>> >> >> > ext/webapp/__init__.py", line 700, in __call__
>> >> >> >    handler.get(*groups)
>> >> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
>> >> >> > retrieve_list_unique.py", line 107, in get
>> >> >> >    f = Flow.get_by_key_name(user.user_id())
>> >> >> > AttributeError: 'NoneType' object has no attribute 'user_id'
>>
>> >> >> > My code is:
>>
>> >> >> > import gflags
>> >> >> > import httplib2
>> >> >> > import logging
>> >> >> > import pprint
>> >> >> > import sys
>> >> >> > import os
>> >> >> > import cgi
>> >> >

[google-appengine] Re: Authentication problem

2011-06-20 Thread GAE app developer
from oauth2client.appengine import OAuth2Decorator

decorator = OAuth2Decorator(
  client_id='',
  client_secret='',
  scope='https://www.googleapis.com/auth/buzz',
  user_agent='buzz-appengine-sample/1.0')

http = httplib2.Http(memcache)
service = build("buzz", "v1", http=http)

class MainHandler(webapp.RequestHandler):

  @decorator.oauth_required
  def get(self):
http = decorator.http()
activities = service.activities()
activitylist = activities.list(scope='@consumption',
 userId='@me').execute(http)
...

def main():
  application = webapp.WSGIApplication(
  [
  ('/', MainHandler),
  ],
  debug=True)
  util.run_wsgi_app(application)

This is the OAuth Decorator code. In this @decorator.oauth_required
gets executed, the problem is it does not go inside get function. So
how to do it.

What to put in @consumption and @me in the below line
activitylist = activities.list(scope='@consumption',
 userId='@me').execute(http)

Please help

On Jun 20, 3:47 pm, Johan Euphrosine  wrote:
> You have to use moderator scope:https://www.googleapis.com/auth/moderator
>
> As explained in the Moderator API 
> documentation:http://code.google.com/apis/moderator/v1/using_rest.html
>
>
>
>
>
>
>
>
>
> On Mon, Jun 20, 2011 at 11:27 AM, Saurabh S  wrote:
> > Thanks Johan,that error has been resolved.
>
> > Now after that it says invalid scope.
> > Error:OAuth 2.0 error: invalid_scope
>
> > Is there any particular URL for scope or I have to manually enter a
> > url on a particular basis
>
> > Can you please provide information on this
>
> > On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
> >> Hi Rohit,
>
> >> If you are running dev_appserver.py,
>
> >> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
> >> access section:https://code.google.com/apis/console/
>
> >> Contains:http://localhost:8080/oauth2callback
>
> >> Note http:// not https://.
>
> >> If you are running the deployed version, make sure it 
> >> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/...
>
> >> Or both depending if you enforce SSL if you application.
>
> >> Hope that helps.
>
> >> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>
> >>  wrote:
> >> > Thanks Johan
> >> > Even though I have signed in using my Gmail account it does not seem
> >> > to make any difference. It is displaying the same error.
>
> >> > And also i tried using the oauthdecorator
> >> > 1. when I click on yes or no button for a particular submission it
> >> > requests for login and after I sign in it displays this error:
> >> > OAuth 2.0 error: redirect_uri_mismatch
> >> > The redirect URI in the request did not match a registered redirect
> >> > URI
>
> >> > Can you please tell why this error appears and how to solve this
> >> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
> >> >> get_current_user() could return None has documented here, if no user
> >> >> is logged 
> >> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>
> >> >> You could also take a look at the new OAuth2Decorator in
> >> >>google-api-python-client that make dealing with OAuth 2.0 
> >> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>
> >> >> I just published an article on how to use it withGoogleTasks API,
> >> >> but that should be easy to translate to Moderator 
> >> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>
> >> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>
> >> >>  wrote:
> >> >> > Hi,
>
> >> >> > I am developing anGoogleappengineapplication using Moderator API
> >> >> > in python. I am able to retrieve the submissions. I am having an
> >> >> >authenticationproblem. My code runs locally without anyproblembut
> >> >> > when I deploy it inGoogleappenginelauncher. It shows the following
> >> >> > error:
>
> >> >> > 'NoneType' object has no attribute 'user_id'
> >> >> > Traceback (most recent call last):
> >> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
> >> >> > ext/webapp/__init__.py", line 700, in __call__
> >> >> >    handler.get(*groups)
> >> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
> >> >> > retrieve_list_unique.py", line 107, in get
> >> >> >    f = Flow.get_by_key_name(user.user_id())
> >> >> > AttributeError: 'NoneType' object has no attribute 'user_id'
>
> >> >> > My code is:
>
> >> >> > import gflags
> >> >> > import httplib2
> >> >> > import logging
> >> >> > import pprint
> >> >> > import sys
> >> >> > import os
> >> >> > import cgi
> >> >> > import pickle
>
> >> >> > from apiclient.discovery import build
> >> >> > from oauth2client.file import Storage
> >> >> > from oauth2client.client import AccessTokenRefreshError
> >> >> > from oauth2client.client import OAuth2WebServerFlow
> >> >> > from oauth2client.tools import run
> >> >> > fromgoogle.appengine.ext import webapp
> >> >> > fromgoogle.appengine.e

Re: [google-appengine] Re: Authentication problem

2011-06-20 Thread Johan Euphrosine
You have to use moderator scope:
https://www.googleapis.com/auth/moderator

As explained in the Moderator API documentation:
http://code.google.com/apis/moderator/v1/using_rest.html

On Mon, Jun 20, 2011 at 11:27 AM, Saurabh S  wrote:
> Thanks Johan,that error has been resolved.
>
> Now after that it says invalid scope.
> Error:OAuth 2.0 error: invalid_scope
>
> Is there any particular URL for scope or I have to manually enter a
> url on a particular basis
>
> Can you please provide information on this
>
> On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
>> Hi Rohit,
>>
>> If you are running dev_appserver.py,
>>
>> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
>> access section:https://code.google.com/apis/console/
>>
>> Contains:http://localhost:8080/oauth2callback
>>
>> Note http:// not https://.
>>
>> If you are running the deployed version, make sure it 
>> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/oauth2callback
>>
>> Or both depending if you enforce SSL if you application.
>>
>> Hope that helps.
>>
>> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  wrote:
>> > Thanks Johan
>> > Even though I have signed in using my Gmail account it does not seem
>> > to make any difference. It is displaying the same error.
>>
>> > And also i tried using the oauthdecorator
>> > 1. when I click on yes or no button for a particular submission it
>> > requests for login and after I sign in it displays this error:
>> > OAuth 2.0 error: redirect_uri_mismatch
>> > The redirect URI in the request did not match a registered redirect
>> > URI
>>
>> > Can you please tell why this error appears and how to solve this
>> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
>> >> get_current_user() could return None has documented here, if no user
>> >> is logged 
>> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>>
>> >> You could also take a look at the new OAuth2Decorator in
>> >>google-api-python-client that make dealing with OAuth 2.0 
>> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>>
>> >> I just published an article on how to use it withGoogleTasks API,
>> >> but that should be easy to translate to Moderator 
>> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>>
>> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>>
>> >>  wrote:
>> >> > Hi,
>>
>> >> > I am developing anGoogleappengineapplication using Moderator API
>> >> > in python. I am able to retrieve the submissions. I am having an
>> >> >authenticationproblem. My code runs locally without anyproblembut
>> >> > when I deploy it inGoogleappenginelauncher. It shows the following
>> >> > error:
>>
>> >> > 'NoneType' object has no attribute 'user_id'
>> >> > Traceback (most recent call last):
>> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
>> >> > ext/webapp/__init__.py", line 700, in __call__
>> >> >    handler.get(*groups)
>> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
>> >> > retrieve_list_unique.py", line 107, in get
>> >> >    f = Flow.get_by_key_name(user.user_id())
>> >> > AttributeError: 'NoneType' object has no attribute 'user_id'
>>
>> >> > My code is:
>>
>> >> > import gflags
>> >> > import httplib2
>> >> > import logging
>> >> > import pprint
>> >> > import sys
>> >> > import os
>> >> > import cgi
>> >> > import pickle
>>
>> >> > from apiclient.discovery import build
>> >> > from oauth2client.file import Storage
>> >> > from oauth2client.client import AccessTokenRefreshError
>> >> > from oauth2client.client import OAuth2WebServerFlow
>> >> > from oauth2client.tools import run
>> >> > fromgoogle.appengine.ext import webapp
>> >> > fromgoogle.appengine.ext.webapp import template
>> >> > fromgoogle.appengine.ext.webapp.util import run_wsgi_app
>> >> > fromgoogle.appengine.ext import db
>> >> > fromgoogle.appengine.api import users
>> >> > from oauth2client.appengine import CredentialsProperty
>> >> > from oauth2client.appengine import StorageByKeyName
>> >> > fromgoogle.appengine.ext.webapp.util import login_required
>> >> > fromgoogle.appengine.api import memcache
>> >> > from oauth2client.appengine import FlowProperty
>>
>> >> > FLAGS = gflags.FLAGS
>>
>> >> > FLOW = OAuth2WebServerFlow(
>> >> >    client_id='My client id',
>> >> >    client_secret='my client_secret',
>> >> >    scope='https://www.example.com/oauth2callback',
>> >> >    user_agent='moderator-cmdline-sample/1.0')
>>
>> >> > gflags.DEFINE_enum('logging_level', 'ERROR',['DEBUG', 'INFO',
>> >> > 'WARNING', 'ERROR', 'CRITICAL'],'Set the level of logging detail.')
>>
>> >> > class Flow(db.Model):   # FlowThreeLegged could also be stored in
>> >> > memcache.
>> >> >    flow = FlowProperty()
>>
>> >> > class Credentials(db.Model):
>> >> >  credentials = CredentialsProperty()
>>
>> >> > class ModPage(webapp.RequestHandler):
>> >> >  def get(self):
>> >> >    # Let the gflags module

[google-appengine] Re: Authentication problem

2011-06-20 Thread GAE app developer
Thanks Johan,that error got resolved.
Authentication is working.

Thank You


On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
> Hi Rohit,
>
> If you are running dev_appserver.py,
>
> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
> access section:https://code.google.com/apis/console/
>
> Contains:http://localhost:8080/oauth2callback
>
> Note http:// not https://.
>
> If you are running the deployed version, make sure it 
> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/oauth2callback
>
> Or both depending if you enforce SSL if you application.
>
> Hope that helps.
>
> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>
>
>
>
>
>
>
>
>
>  wrote:
> > Thanks Johan
> > Even though I have signed in using my Gmail account it does not seem
> > to make any difference. It is displaying the same error.
>
> > And also i tried using the oauthdecorator
> > 1. when I click on yes or no button for a particular submission it
> > requests for login and after I sign in it displays this error:
> > OAuth 2.0 error: redirect_uri_mismatch
> > The redirect URI in the request did not match a registered redirect
> > URI
>
> > Can you please tell why this error appears and how to solve this
> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
> >> get_current_user() could return None has documented here, if no user
> >> is logged 
> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>
> >> You could also take a look at the new OAuth2Decorator in
> >>google-api-python-client that make dealing with OAuth 2.0 
> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>
> >> I just published an article on how to use it withGoogleTasks API,
> >> but that should be easy to translate to Moderator 
> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>
> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>
> >>  wrote:
> >> > Hi,
>
> >> > I am developing anGoogleappengineapplication using Moderator API
> >> > in python. I am able to retrieve the submissions. I am having an
> >> >authenticationproblem. My code runs locally without anyproblembut
> >> > when I deploy it inGoogleappenginelauncher. It shows the following
> >> > error:
>
> >> > 'NoneType' object has no attribute 'user_id'
> >> > Traceback (most recent call last):
> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
> >> > ext/webapp/__init__.py", line 700, in __call__
> >> >    handler.get(*groups)
> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
> >> > retrieve_list_unique.py", line 107, in get
> >> >    f = Flow.get_by_key_name(user.user_id())
> >> > AttributeError: 'NoneType' object has no attribute 'user_id'
>
> >> > My code is:
>
> >> > import gflags
> >> > import httplib2
> >> > import logging
> >> > import pprint
> >> > import sys
> >> > import os
> >> > import cgi
> >> > import pickle
>
> >> > from apiclient.discovery import build
> >> > from oauth2client.file import Storage
> >> > from oauth2client.client import AccessTokenRefreshError
> >> > from oauth2client.client import OAuth2WebServerFlow
> >> > from oauth2client.tools import run
> >> > fromgoogle.appengine.ext import webapp
> >> > fromgoogle.appengine.ext.webapp import template
> >> > fromgoogle.appengine.ext.webapp.util import run_wsgi_app
> >> > fromgoogle.appengine.ext import db
> >> > fromgoogle.appengine.api import users
> >> > from oauth2client.appengine import CredentialsProperty
> >> > from oauth2client.appengine import StorageByKeyName
> >> > fromgoogle.appengine.ext.webapp.util import login_required
> >> > fromgoogle.appengine.api import memcache
> >> > from oauth2client.appengine import FlowProperty
>
> >> > FLAGS = gflags.FLAGS
>
> >> > FLOW = OAuth2WebServerFlow(
> >> >    client_id='My client id',
> >> >    client_secret='my client_secret',
> >> >    scope='https://www.example.com/oauth2callback',
> >> >    user_agent='moderator-cmdline-sample/1.0')
>
> >> > gflags.DEFINE_enum('logging_level', 'ERROR',['DEBUG', 'INFO',
> >> > 'WARNING', 'ERROR', 'CRITICAL'],'Set the level of logging detail.')
>
> >> > class Flow(db.Model):   # FlowThreeLegged could also be stored in
> >> > memcache.
> >> >    flow = FlowProperty()
>
> >> > class Credentials(db.Model):
> >> >  credentials = CredentialsProperty()
>
> >> > class ModPage(webapp.RequestHandler):
> >> >  def get(self):
> >> >    # Let the gflags module process the command-line arguments
>
> >> >    service = build("moderator", "v1", developerKey='my developer
> >> > key')
>
> >> > class voteUpdate(webapp.RequestHandler):
> >> >  def get(self):
> >> >      user = users.get_current_user()
> >> >      logging.info(user)
> >> >      f = Flow.get_by_key_name(user.user_id())
> >> >      if f:
> >> >        credentials = f.flow.step2_exchange(self.request.params)
> >> >        c = Credentials(key_name=user.user_id(),
> >> > credentials=credentials)
> >> >        c.put()
> >> >        f.delete()
> >> >    

[google-appengine] Re: Authentication problem

2011-06-20 Thread Saurabh S
Thanks Johan,that error has been resolved.

Now after that it says invalid scope.
Error:OAuth 2.0 error: invalid_scope

Is there any particular URL for scope or I have to manually enter a
url on a particular basis

Can you please provide information on this

On Jun 20, 12:35 pm, Johan Euphrosine  wrote:
> Hi Rohit,
>
> If you are running dev_appserver.py,
>
> make sure the list of Redirect URIs in theGoogleAPIs Console/Api
> access section:https://code.google.com/apis/console/
>
> Contains:http://localhost:8080/oauth2callback
>
> Note http:// not https://.
>
> If you are running the deployed version, make sure it 
> contains:https://myappid.appspot.com/oauth2callbackhttp://myappid.appspot.com/oauth2callback
>
> Or both depending if you enforce SSL if you application.
>
> Hope that helps.
>
> On Mon, Jun 20, 2011 at 8:49 AM, GAEappdeveloper
>
>
>
>
>
>
>
>
>
>  wrote:
> > Thanks Johan
> > Even though I have signed in using my Gmail account it does not seem
> > to make any difference. It is displaying the same error.
>
> > And also i tried using the oauthdecorator
> > 1. when I click on yes or no button for a particular submission it
> > requests for login and after I sign in it displays this error:
> > OAuth 2.0 error: redirect_uri_mismatch
> > The redirect URI in the request did not match a registered redirect
> > URI
>
> > Can you please tell why this error appears and how to solve this
> > On Jun 18, 4:17 am, Johan Euphrosine  wrote:
> >> get_current_user() could return None has documented here, if no user
> >> is logged 
> >> in:http://code.google.com/appengine/docs/python/users/functions.html
>
> >> You could also take a look at the new OAuth2Decorator in
> >>google-api-python-client that make dealing with OAuth 2.0 
> >>easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>
> >> I just published an article on how to use it withGoogleTasks API,
> >> but that should be easy to translate to Moderator 
> >> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>
> >> On Fri, Jun 17, 2011 at 2:45 PM, GAEappdeveloper
>
> >>  wrote:
> >> > Hi,
>
> >> > I am developing anGoogleappengineapplication using Moderator API
> >> > in python. I am able to retrieve the submissions. I am having an
> >> >authenticationproblem. My code runs locally without anyproblembut
> >> > when I deploy it inGoogleappenginelauncher. It shows the following
> >> > error:
>
> >> > 'NoneType' object has no attribute 'user_id'
> >> > Traceback (most recent call last):
> >> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
> >> > ext/webapp/__init__.py", line 700, in __call__
> >> >    handler.get(*groups)
> >> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
> >> > retrieve_list_unique.py", line 107, in get
> >> >    f = Flow.get_by_key_name(user.user_id())
> >> > AttributeError: 'NoneType' object has no attribute 'user_id'
>
> >> > My code is:
>
> >> > import gflags
> >> > import httplib2
> >> > import logging
> >> > import pprint
> >> > import sys
> >> > import os
> >> > import cgi
> >> > import pickle
>
> >> > from apiclient.discovery import build
> >> > from oauth2client.file import Storage
> >> > from oauth2client.client import AccessTokenRefreshError
> >> > from oauth2client.client import OAuth2WebServerFlow
> >> > from oauth2client.tools import run
> >> > fromgoogle.appengine.ext import webapp
> >> > fromgoogle.appengine.ext.webapp import template
> >> > fromgoogle.appengine.ext.webapp.util import run_wsgi_app
> >> > fromgoogle.appengine.ext import db
> >> > fromgoogle.appengine.api import users
> >> > from oauth2client.appengine import CredentialsProperty
> >> > from oauth2client.appengine import StorageByKeyName
> >> > fromgoogle.appengine.ext.webapp.util import login_required
> >> > fromgoogle.appengine.api import memcache
> >> > from oauth2client.appengine import FlowProperty
>
> >> > FLAGS = gflags.FLAGS
>
> >> > FLOW = OAuth2WebServerFlow(
> >> >    client_id='My client id',
> >> >    client_secret='my client_secret',
> >> >    scope='https://www.example.com/oauth2callback',
> >> >    user_agent='moderator-cmdline-sample/1.0')
>
> >> > gflags.DEFINE_enum('logging_level', 'ERROR',['DEBUG', 'INFO',
> >> > 'WARNING', 'ERROR', 'CRITICAL'],'Set the level of logging detail.')
>
> >> > class Flow(db.Model):   # FlowThreeLegged could also be stored in
> >> > memcache.
> >> >    flow = FlowProperty()
>
> >> > class Credentials(db.Model):
> >> >  credentials = CredentialsProperty()
>
> >> > class ModPage(webapp.RequestHandler):
> >> >  def get(self):
> >> >    # Let the gflags module process the command-line arguments
>
> >> >    service = build("moderator", "v1", developerKey='my developer
> >> > key')
>
> >> > class voteUpdate(webapp.RequestHandler):
> >> >  def get(self):
> >> >      user = users.get_current_user()
> >> >      logging.info(user)
> >> >      f = Flow.get_by_key_name(user.user_id())
> >> >      if f:
> >> >        credentials = f.flow

Re: [google-appengine] I have reached 10 AppEngine sites, I really need some more

2011-06-20 Thread Robert Kluin
Last I heard, you should file a billing support issue detailing why you need 
more apps. 

http://code.google.com/support/bin/request.py?contact_type=AppEngineBillingSupport





On Jun 19, 2011, at 3:10, Chris Davis  wrote:

> I have reached 10 AppEngine sites, I really need some more, what can I
> do?
> 
> Thanks
> 
> Chris
> 
> -- 
> 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.
> 

-- 
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.



[google-appengine] Re : 1.5.1 SDK Prerelease

2011-06-20 Thread Sahid Orentino Ferdjaoui


- All user request have an X-AppEngine-Country header which contains the
  ISO-3166-1 alpha-2 country code for the user, based on the IP address of 
the


Hello,

Just a question about the new header "X-AppEngine-Country" it is avalaible 
only if the users are registered with User API?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/NfYGIZvS_SIJ.
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.



Re: [google-appengine] Re: Authentication problem

2011-06-20 Thread Johan Euphrosine
Hi Rohit,

If you are running dev_appserver.py,

make sure the list of Redirect URIs in the Google APIs Console/Api
access section:
https://code.google.com/apis/console/

Contains:
http://localhost:8080/oauth2callback

Note http:// not https://.

If you are running the deployed version, make sure it contains:
https://myappid.appspot.com/oauth2callback
http://myappid.appspot.com/oauth2callback

Or both depending if you enforce SSL if you application.

Hope that helps.

On Mon, Jun 20, 2011 at 8:49 AM, GAE app developer
 wrote:
> Thanks Johan
> Even though I have signed in using my Gmail account it does not seem
> to make any difference. It is displaying the same error.
>
> And also i tried using the oauthdecorator
> 1. when I click on yes or no button for a particular submission it
> requests for login and after I sign in it displays this error:
> OAuth 2.0 error: redirect_uri_mismatch
> The redirect URI in the request did not match a registered redirect
> URI
>
> Can you please tell why this error appears and how to solve this
> On Jun 18, 4:17 am, Johan Euphrosine  wrote:
>> get_current_user() could return None has documented here, if no user
>> is logged 
>> in:http://code.google.com/appengine/docs/python/users/functions.html
>>
>> You could also take a look at the new OAuth2Decorator in
>> google-api-python-client that make dealing with OAuth 2.0 
>> easier:http://code.google.com/p/google-api-python-client/wiki/OAuth2AppEngin...
>>
>> I just published an article on how to use it with Google Tasks API,
>> but that should be easy to translate to Moderator 
>> API:http://googleappengine.blogspot.com/2011/06/getting-started-with-task...
>>
>> On Fri, Jun 17, 2011 at 2:45 PM, GAE app developer
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  wrote:
>> > Hi,
>>
>> > I am developing an Google app engine application using Moderator API
>> > in python. I am able to retrieve the submissions. I am having an
>> > authentication problem. My code runs locally without any problem but
>> > when I deploy it in Google app engine launcher. It shows the following
>> > error:
>>
>> > 'NoneType' object has no attribute 'user_id'
>> > Traceback (most recent call last):
>> >  File "/base/python_runtime/python_lib/versions/1/google/appengine/
>> > ext/webapp/__init__.py", line 700, in __call__
>> >    handler.get(*groups)
>> >  File "/base/data/home/apps/ktbookstore/3.351197542995528852/
>> > retrieve_list_unique.py", line 107, in get
>> >    f = Flow.get_by_key_name(user.user_id())
>> > AttributeError: 'NoneType' object has no attribute 'user_id'
>>
>> > My code is:
>>
>> > import gflags
>> > import httplib2
>> > import logging
>> > import pprint
>> > import sys
>> > import os
>> > import cgi
>> > import pickle
>>
>> > from apiclient.discovery import build
>> > from oauth2client.file import Storage
>> > from oauth2client.client import AccessTokenRefreshError
>> > from oauth2client.client import OAuth2WebServerFlow
>> > from oauth2client.tools import run
>> > from google.appengine.ext import webapp
>> > from google.appengine.ext.webapp import template
>> > from google.appengine.ext.webapp.util import run_wsgi_app
>> > from google.appengine.ext import db
>> > from google.appengine.api import users
>> > from oauth2client.appengine import CredentialsProperty
>> > from oauth2client.appengine import StorageByKeyName
>> > from google.appengine.ext.webapp.util import login_required
>> > from google.appengine.api import memcache
>> > from oauth2client.appengine import FlowProperty
>>
>> > FLAGS = gflags.FLAGS
>>
>> > FLOW = OAuth2WebServerFlow(
>> >    client_id='My client id',
>> >    client_secret='my client_secret',
>> >    scope='https://www.example.com/oauth2callback',
>> >    user_agent='moderator-cmdline-sample/1.0')
>>
>> > gflags.DEFINE_enum('logging_level', 'ERROR',['DEBUG', 'INFO',
>> > 'WARNING', 'ERROR', 'CRITICAL'],'Set the level of logging detail.')
>>
>> > class Flow(db.Model):   # FlowThreeLegged could also be stored in
>> > memcache.
>> >    flow = FlowProperty()
>>
>> > class Credentials(db.Model):
>> >  credentials = CredentialsProperty()
>>
>> > class ModPage(webapp.RequestHandler):
>> >  def get(self):
>> >    # Let the gflags module process the command-line arguments
>>
>> >    service = build("moderator", "v1", developerKey='my developer
>> > key')
>>
>> > class voteUpdate(webapp.RequestHandler):
>> >  def get(self):
>> >      user = users.get_current_user()
>> >      logging.info(user)
>> >      f = Flow.get_by_key_name(user.user_id())
>> >      if f:
>> >        credentials = f.flow.step2_exchange(self.request.params)
>> >        c = Credentials(key_name=user.user_id(),
>> > credentials=credentials)
>> >        c.put()
>> >        f.delete()
>> >        self.redirect("/")
>> >      else:
>> >        pass
>> >      user = users.get_current_user()
>> >      c = Credentials.get_by_key_name(user.user_id())
>> >      if c:
>> >        http = httplib2.Http()
>> >        http = c.credentials.authorize(http)
>> >      else:
>> >       

Re: [google-appengine] #appengine irc chat transcript 2011-06-15

2011-06-20 Thread Jeff Schnitzer
IMNSHO, the issue with a JS runtime for GAE is not the language but having a
purely async API to all of GAE's services.  Node.js wouldn't work unless you
can fire off hundreds of async requests and get callbacks... but right now,
at least at the level of the documented API, you can only fire off 10 async
requests and you can't get callbacks.  Is this just an arbitrary limit of
API design or are there other architectural restrictions preventing a purely
async appserver?

I think this async model would potentially be just as interesting in
Javaland as it would be in Node.js.  Of course, the APIs would look very
different - it would be a lot of work just designing them.

Jeff

On Sun, Jun 19, 2011 at 11:25 PM, Ikai Lan (Google) wrote:

> Thanks Jay! We really need to hear more from developers like you.
>
> I won't repeat my comments re: PHP runtime, but if some developers would
> show that they were serious about maintaining a JS runtime, we would do what
> we can on our side to help out short of actually maintaining it. We'll try
> to keep the developers up to speed on new developments and upcoming
> features. Maintaining another SDK will take resources we currently don't
> have at the moment.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>
>
> On Mon, Jun 20, 2011 at 1:56 PM, Jay Young  wrote:
>
>> Sadly, AppEngineJS is a ghost these days.  It seems to have died around
>> December and is a few releases back.  It is also based on a
>> no-longer-supported webapp framework that was part of RingoJS (the CommonJS
>> framework that runs on Rhino).
>>
>> That said, I'm still using Ringo/Rhino on GAE, and it's pretty solid.
>>  Interfacing with the Java runtime APIs is easy (actually, interfacing with
>> anything Java is easy).  Loading requests take about 5 seconds to return,
>> and subsequent requests are very quick.  The development pace on Rhino has
>> actually picked up again in the last few months (they recently created a new
>> Google Group  and
>> migrated their code to GitHub ), and as
>> part of Google's Summer of Code, there is a project being mentored by the
>> lead developer of Ringo going on to upgrade Rhino to use Java 7's
>> invokeDynamic to boost performance even more.  It seems like "V8 Envy" is
>> lighting a fire under people these days.  :)
>>
>> It would be really awesome, and probably much easier than creating a whole
>> new runtime, if Google was truly interested in looking at new directions, to
>> build a JS runtime on top of Ringo's CommonJS implementation (or even just
>> Rhino).  I think that'd be a great way to meet Javascript developers half
>> way, if they could set up all the plumbing and provide a webapp-like
>> framework so that everyone using Rhino didn't have to do it themselves.
>>
>> And if you really wanted to go the extra mile, get the Closure folks to
>> tweak the library and compiler for server-side stuff.  ;)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-appengine/-/naiM73IJdzgJ.
>>
>> 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.
>>
>
>  --
> 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.
>

-- 
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.



[google-appengine] Version 1.5.1 not available on the download page

2011-06-20 Thread sergey
When i start Google App Engine launcher, i see that new version is
ready:
http://s41.radikal.ru/i092/1106/79/86e0efd9c5a7.jpg
But i can't find it on:
http://code.google.com/appengine/downloads.html

-- 
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.