[google-appengine] Re: list of referenceProperty?
ooh, nice workaround! On Tue, Feb 17, 2009 at 11:12 PM, Marzia Niccolai ma...@google.com wrote: Hi, You can have a list of key objects, and you can just use db.get(Key) to retrieve any entry in the list. -Marzia On Sun, Feb 15, 2009 at 9:27 PM, Pratik C. Rokade evolution.g...@gmail.com wrote: Hello guys, can I have list of referenceProperty? How can I fire queries on such property? Regards, Pratik. Sent from my mobile device. --~--~-~--~~~---~--~~ 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: is datastore timestamped for concurrency at page level?
It's really hard to say based on your description. Are you using transactions? Can you show us your code? -Nick Johnson On Feb 18, 3:41 pm, Nikola ntos...@gmail.com wrote: I am trying to go through all entities of a kind, using the __key__ property. I take 10 at a time, and run threads in parallel to do something and then update these entities (I am doing this viaremote_api). What I often get is: TransactionFailedError: too much contention on these datastore entities. please try again. How is this possible? I thought the datastore uses optimistic concurrency based on timestamps of individual records, not pages of adjacent entities? --~--~-~--~~~---~--~~ 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: How to use ReferenceProperty?
Thanks Nick for the answer however I'm not sure I fully understood it... what do you mean by 'key_names'? which key should I put where and how should I query it? On Feb 18, 8:23 pm, Nick Winter livel...@gmail.com wrote: Instead of using ReferenceProperties, I'd suggest using key_names (the user name, in both cases). Makes things easier, and you can get the settings without getting the user. --~--~-~--~~~---~--~~ 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: AEP 1.0beta6 testers needed!
Hi John, thanks for the feedback! On Feb 18, 9:01 pm, johnP j...@thinkwave.com wrote: 2. I like the warning you provide about lazy-loading apps when needed. I am using ReportLab, which is registered as an app in settings.py. The warning indicated that it's doing a ton of imports up-front, and prompted me to place it in the exclude list. Which I did. And everything continues to work. I'll assume it will work faster in production - but have not tested this. This warning is not about speed, but about recursive import bugs. I've improved the warning message. Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ 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: Help: The phone number has been sent too many messages or has already been used to confirm an account.
Bouncing this post to keep in view. Hopefully a Googler (Marzia?) will notice and help me resolve this registration snafu. Is my only other option to use a friend's cellphone? That seems to go against the purpose of verifying my identity. However, if I get no help clearing the disallowed state on my phone number, a friend's phone would seem the only answer. Any help would be greatly appreciated. Thanks in advance, Guy On Feb 18, 11:55 am, Guy Davis da...@guydavis.ca wrote: I am not able to get past the Verify Your Account by SMS page. I had originally tried using my plain GMail account (guydavis...@gmail.com), but now would like to use my current Google Apps account (da...@guydavis.ca). I have reviewed the SMS FAQ page and it does not provide help for my current situation. Would someone from Google please contact me at either address so that I can get past this and create an application? Any help would be greatly appreciated. Thanks in advance, Guy --~--~-~--~~~---~--~~ 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: is datastore timestamped for concurrency at page level?
Each entity is in an entity group by itself. I'm not using transactions and It would be too hard to isolate the code, so I'm not providing an example. I sidestepped the issue by doing only the network operations in parallel threads, then use remote_api sequentially. The problem could have been just that you can't safely use remote_api from multiple threads... Along the way I implemented a parallel map function in Python using threading. Here is it in case someone's interested (remember GIL, it is only useful for doing tasks heavy on I/O in parallel, it won't take advantage of multiple cores): def pmap(function, *iterables): import threading class pmap_thread(threading.Thread): def __init__(self, *args): super(pmap_thread, self).__init__() self.result = None self.args = args def run(self): self.result = function(*args) threads = [] iterables = map(iter, iterables) try: while True: args = [it.next() for it in iterables] threads.append(pmap_thread(*args)) except StopIteration: pass for t in threads: t.start() def gen(): for t in threads: t.join() yield t.result return gen() # start all threads immediately and return without blocking On 19 Фев, 12:17, Nick Johnson arach...@notdot.net wrote: It's really hard to say based on your description. Are you using transactions? Can you show us your code? -Nick Johnson On Feb 18, 3:41 pm, Nikola ntos...@gmail.com wrote: I am trying to go through all entities of a kind, using the __key__ property. I take 10 at a time, and run threads in parallel to do something and then update these entities (I am doing this viaremote_api). What I often get is: TransactionFailedError: too much contention on these datastore entities. please try again. How is this possible? I thought the datastore uses optimistic concurrency based on timestamps of individual records, not pages of adjacent entities? --~--~-~--~~~---~--~~ 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: Help: The phone number has been sent too many messages or has already been used to confirm an account.
http://appengine.google.com/waitlist/sms_issues On Feb 19, 10:18 am, Guy Davis da...@guydavis.ca wrote: Bouncing this post to keep in view. Hopefully a Googler (Marzia?) will notice and help me resolve this registration snafu. Is my only other option to use a friend's cellphone? That seems to go against the purpose of verifying my identity. However, if I get no help clearing the disallowed state on my phone number, a friend's phone would seem the only answer. Any help would be greatly appreciated. Thanks in advance, Guy On Feb 18, 11:55 am, Guy Davis da...@guydavis.ca wrote: I am not able to get past the Verify Your Account by SMS page. I had originally tried using my plain GMail account (guydavis...@gmail.com), but now would like to use my current Google Apps account (da...@guydavis.ca). I have reviewed the SMS FAQ page and it does not provide help for my current situation. Would someone from Google please contact me at either address so that I can get past this and create an application? Any help would be greatly appreciated. Thanks in advance, Guy --~--~-~--~~~---~--~~ 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] MemCache/datastore failing
Hi, somehow my app. can't use memcache anymore (it was working fine a week ago). For instance, I clear the cache (memcache.flush_all()), use the app (almost every operation uses caching) and then call the cache stats page (stats = memcache.get_stats()) but the stats variable gets consistently 'none' value. As a result, latency has increased a lot making responses exceed the 10sec. timeout (maybe other bug here, as now it should be 30s right? although the timeout can be from the 'gadgets.io.makeRequest' from the opensocial part of the app.) The traceback of the problem I got with the datastore: An error occurred for the API request datastore_v3.RunQuery(). Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 503, in __call__ handler.post(*groups) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 371, in post avgRating = get_avg_rating(friend) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 95, in get_avg_rating ratings = query.get() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1346, in get results = self.fetch(1) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1390, in fetch raw = self._get_query().Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 942, in Get return self._Run(limit, offset)._Next(limit) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 883, in _Run apiproxy_stub_map.MakeSyncCall('datastore_v3', 'RunQuery', pb, result) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 68, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 240, in MakeSyncCall stub.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 183, in MakeSyncCall rpc.CheckSuccess() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 111, in CheckSuccess raise self.exception Error: An error occurred for the API request datastore_v3.RunQuery(). Some times I get this kind of traceback, which I'm sure is the deadline problem: class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 620, in main run_wsgi_app(application) File /base/python_lib/versions/1/google/appengine/ext/webapp/ util.py, line 76, in run_wsgi_app result = application(env, _start_response) File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 503, in __call__ handler.post(*groups) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 372, in post numVisit = get_num_visits(friend) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 487, in get_num_visits delete_old_visits(owner) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 492, in delete_old_visits results = query.fetch(1000) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1390, in fetch raw = self._get_query().Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 942, in Get return self._Run(limit, offset)._Next(limit) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1536, in _Next apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Next', req, result) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 68, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 240, in MakeSyncCall stub.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 182, in MakeSyncCall rpc.Wait() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 97, in Wait rpc_completed = self._WaitImpl() File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 104, in _WaitImpl rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self) Any ideas? Sorry for the long post and thanks for reading. --~--~-~--~~~---~--~~ 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] Full page memcache caching and HTTP status in logs
Hello, it's not a big deal because it's only in the logs but - maybe it's only a small problem. I'm caching my whole rendered site as it comes out of the template engine plus all the headers in memcache, to serve with minimum latency (A cached request needs normally 7ms-cpu at the moment). I'm printing the cached request and the cached headers directly with print, without touching the webapp-framework. The problem is, that if i cache a 404 Error page on the client side everything is perfect (tested with netcat), but it logs status code 200 to the admin panel if cached and 404 if its not cached. So i think i have to signalize to the webserver that this is a 404? How do i do that without the webapp framework? Greetings, Steffen signature.asc Description: PGP signature
[google-appengine] Lengthy syntax on model's required property
I prefer short syntax on required properties, for example: name = db.StringProperty('Name')* instead of name = db.StringProperty('Name', required=True). Besd regards, ub121 --~--~-~--~~~---~--~~ 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: Full page memcache caching and HTTP status in logs
On Thu, 19 Feb 2009 16:58:59 +0100 Steffen 'stefreak' Neubauer stefr...@stefreak.de wrote: The problem is, that if i cache a 404 Error page on the client side everything is perfect Hmm no, it's not perfect :) The client gets a 200 if it's cached and a 404 if it's not cached. How do i send a 404 to the client without touching the webapp framework? Could not find anything. Thank you. signature.asc Description: PGP signature
[google-appengine] real-time impression counting library
Hi all, I've written a little library for providing high-performance counter services suitable for use on every hit: source: http://code.google.com/p/fastpageviews/ demo: http://fastpageviews.appspot.com/ As the docs explain, it uses memcache + DB, but unlike precise counters, e.g. sharded counters, trades durability (the 'D' in ACID) for scale. I ran a simple load tester on it, and saw very little DB traffic. Feedback, contribs and benchmark results all appreciated. adam --~--~-~--~~~---~--~~ 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] Problem with javascript on the appengine.
Hi all, My application use a lot of javascript, that is loaded in the main static html file. all the javascript files are declared in the app.yaml file. The javascript is being loaded and work fine in the developing server, but when I deploy the application of the google appengine server, it seems as if the javascript is not loaded and does not work at all. Why is that and how can I fix it? --~--~-~--~~~---~--~~ 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] Get the root entity for a given Model
Hey, I find myself wanting to get at the very root entity for a given Model that may be part of a longer entity chain. Wondering what others think about suggesting a feature request: add instance method to db.Model root() Returns a model instance for the root (top parent) entity within the entity chain of this instance, or None if this instance does not have a parent Thanks in advance for any comments... --~--~-~--~~~---~--~~ 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: How to use ReferenceProperty?
When creating an AppUser, pass in key_name: user = AppUser(name=nwinter, key_name=nwinter) Better to remove potential for missing the key_name by putting it in the constructor: class AppUser(db.Model): name = db.StringProperty() ... def __init__(self, *args, **kargs): kargs[key_name] = kargs[name] Same thing with UserSettings. Then you can do: user = AppUser(name=nwinter) user.put() user = AppUser.get_by_key_name(nwinter) settings = UserSettings.get_by_key_name(nwinter) --~--~-~--~~~---~--~~ 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: Problem with javascript on the appengine.
try writing a html with all the javascript at top of the file.py then the handlers --- On Thu, 2/19/09, dr hil drorhil...@gmail.com wrote: From: dr hil drorhil...@gmail.com Subject: [google-appengine] Problem with javascript on the appengine. To: Google App Engine google-appengine@googlegroups.com Date: Thursday, February 19, 2009, 1:30 PM Hi all, My application use a lot of javascript, that is loaded in the main static html file. all the javascript files are declared in the app.yaml file. The javascript is being loaded and work fine in the developing server, but when I deploy the application of the google appengine server, it seems as if the javascript is not loaded and does not work at all. Why is that and how can I fix it? --~--~-~--~~~---~--~~ 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: Google Accounts
wouldnt it be nice if clients could pay with google checkout then use their id to log in with a payment sticky mess age attached saying i have paid to use the xyzdomain services to correctly log in and authenticate ? --- On Wed, 2/18/09, Geoffrey Spear geoffsp...@gmail.com wrote: From: Geoffrey Spear geoffsp...@gmail.com Subject: [google-appengine] Re: Google Accounts To: Google App Engine google-appengine@googlegroups.com Date: Wednesday, February 18, 2009, 3:15 PM On Feb 18, 3:07 pm, GenghisOne mdkach...@gmail.com wrote: Does it make sense for developers to tie their apps into Google Accounts and if so, why? Or put another way, what are the pros and cons of tying an app into Google Accounts? Pros: you don't have to do your own authentication, and in many cases have no need to manage session cookies. Cons: your users have to have Google accounts. --~--~-~--~~~---~--~~ 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: Full page memcache caching and HTTP status in logs
Hmm no, it's not perfect :) The client gets a 200 if it's cached and a 404 if it's not cached. How do i send a 404 to the client without touching the webapp framework? Could not find anything. Thank you. http://www.apps.ietf.org/rfc/rfc3875.html#sec-6.3.3 print ('Status: ' + str(httpStatus)) or print ('Status: 404') --~--~-~--~~~---~--~~ 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: Call class from another class
and i want to call the New class from MainHandler and support to New class the nick name, and do something with it. I don't think you can call the New class. The webapp.RequestHandler subclasses are run somewhere in webapp.WSGIApplication(). What do you want to do in the first place? (i.e. why do you want to call the New class?) --~--~-~--~~~---~--~~ 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: Full page memcache caching and HTTP status in logs
Hmm no, it's not perfect :) The client gets a 200 if it's cached and a 404 if it's not cached. How do i send a 404 to the client without touching the webapp framework? Could not find anything. You need to use the standard CGI Status header. print ('Status: 404') print ('Content-Type: text/html') See http://www.apps.ietf.org/rfc/rfc3875.html#sec-6.3.3 --~--~-~--~~~---~--~~ 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: real-time impression counting library
This looks cool. I'm still getting familiar with appengine (started looking at it two days ago.) This small app shows how to use memcache and datastore. I just read the whole code. In IncrPageCount(), if memcache.get(memcache_id) == None: # initializes memcache if missing return GetPageCount(pagename) However, in GetPageCount() val = memcache.get(memcache_id) if (val != None): return val Obvious redundancy. That's interesting. I guess it's to check if the page has been updated between calls? --~--~-~--~~~---~--~~ 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: MemCache/datastore failing
Hi, It's difficult to see with only the stack traces, please post the code causing this as well. Also, the datastore deadline's remain the same, the runtime request limit is now 30 second, not the datastore. I would say that the second stack trace seems like you may be trying to fetch 1000 records, which is probably the cause of the deadline error, depending on your data model. -Marzia On Thu, Feb 19, 2009 at 4:56 AM, DarkCoiote darkcoi...@gmail.com wrote: Hi, somehow my app. can't use memcache anymore (it was working fine a week ago). For instance, I clear the cache (memcache.flush_all()), use the app (almost every operation uses caching) and then call the cache stats page (stats = memcache.get_stats()) but the stats variable gets consistently 'none' value. As a result, latency has increased a lot making responses exceed the 10sec. timeout (maybe other bug here, as now it should be 30s right? although the timeout can be from the 'gadgets.io.makeRequest' from the opensocial part of the app.) The traceback of the problem I got with the datastore: An error occurred for the API request datastore_v3.RunQuery(). Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 503, in __call__ handler.post(*groups) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 371, in post avgRating = get_avg_rating(friend) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 95, in get_avg_rating ratings = query.get() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1346, in get results = self.fetch(1) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1390, in fetch raw = self._get_query().Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 942, in Get return self._Run(limit, offset)._Next(limit) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 883, in _Run apiproxy_stub_map.MakeSyncCall('datastore_v3', 'RunQuery', pb, result) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 68, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 240, in MakeSyncCall stub.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 183, in MakeSyncCall rpc.CheckSuccess() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 111, in CheckSuccess raise self.exception Error: An error occurred for the API request datastore_v3.RunQuery(). Some times I get this kind of traceback, which I'm sure is the deadline problem: class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 620, in main run_wsgi_app(application) File /base/python_lib/versions/1/google/appengine/ext/webapp/ util.py, line 76, in run_wsgi_app result = application(env, _start_response) File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 503, in __call__ handler.post(*groups) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 372, in post numVisit = get_num_visits(friend) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 487, in get_num_visits delete_old_visits(owner) File /base/data/home/apps/date-review/2.331374829726725911/ main.py, line 492, in delete_old_visits results = query.fetch(1000) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1390, in fetch raw = self._get_query().Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 942, in Get return self._Run(limit, offset)._Next(limit) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1536, in _Next apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Next', req, result) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 68, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py, line 240, in MakeSyncCall stub.MakeSyncCall(service, call, request, response) File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 182, in MakeSyncCall rpc.Wait() File /base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py, line 97, in Wait rpc_completed = self._WaitImpl() File /base/python_lib/versions/1/google/appengine/runtime/ apiproxy.py, line 104, in _WaitImpl rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self) Any ideas? Sorry for the long post and thanks for reading.
[google-appengine] Re: Full page memcache caching and HTTP status in logs
On Thu, 19 Feb 2009 15:21:47 -0800 (PST) ArtemGr artem...@gmail.com wrote: You need to use the standard CGI Status header. print ('Status: 404') print ('Content-Type: text/html') See http://www.apps.ietf.org/rfc/rfc3875.html#sec-6.3.3 Yes thank you. Found it out for myself already :) signature.asc Description: PGP signature
[google-appengine] Re: Get the root entity for a given Model
I find that it's best to write in terms of keys because it's easy to turn keys into models and fetching models when one could use a key is a bad idea because fetching entities is so expensive. a root_key function that takes either a model instance or a key seems like a better idea. Also, root models are their own ancestor (as far as queries are concerned), so None may not be the most useful result. def root_key_or_none(k_or_m): if isinstance(k_or_m, db.Key): parent_key = k_or_m.parent() else: parent_key = k_or_m.parent_key() next = parent_key while next: parent_key = next next = parent_key.parent() return parent_key On Feb 19, 11:26 am, Rein Petersen rein.peter...@gmail.com wrote: Hey, I find myself wanting to get at the very root entity for a given Model that may be part of a longer entity chain. Wondering what others think about suggesting a feature request: add instance method to db.Model root() Returns a model instance for the root (top parent) entity within the entity chain of this instance, or None if this instance does not have a parent Thanks in advance for any comments... --~--~-~--~~~---~--~~ 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] How big can memcache entries be?
Memcache appears to use pickle, so it saves the object, everything that the object points to, and so on. This means that multiple db.Model instances may be stored by a single memcache write. What is the maximum size of a memcache entry? IIRC, query objects don't like to be pickled and db.Key instances aren't very small when pickled. --~--~-~--~~~---~--~~ 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: How big can memcache entries be?
The largest a memcache item may be is 1MB. On Thu, Feb 19, 2009 at 6:10 PM, Andy Freeman ana...@earthlink.net wrote: Memcache appears to use pickle, so it saves the object, everything that the object points to, and so on. This means that multiple db.Model instances may be stored by a single memcache write. What is the maximum size of a memcache entry? IIRC, query objects don't like to be pickled and db.Key instances aren't very small when pickled. --~--~-~--~~~---~--~~ 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: Pylons framework?
On Thu, Feb 19, 2009 at 9:33 PM, boson dan.kam...@gmail.com wrote: I've seen a number of threads going back concerning Pylons [1] support and problems in App Engine. Also there is a appengine-monkey patch [2] that attempts to integrate Pylons (but looks kinda scary). What is the latest greatest status / wisdom on this? Pylons works with appengine-monkey, but take somes fiddling on some systems. The main issue is that Setuptools' pkg_resources depends on some parts of the stdlib that are missing in App Engine.. things related to files and loading modules. Google added more support in SDK 1.1.9 but it's still not enough to run Pylons without appengine-monkey. The details are here: http://code.google.com/p/googleappengine/issues/detail?id=60 You may also encounter the problem this guy had with import site: http://groups.google.com/group/pylons-discuss/browse_thread/thread/cf4d9538891d31ad/0a687c703eb58fe4 The latest instructions for installing Pylons on App Engine are here: http://wiki.pylonshq.com/display/pylonscookbook/Creating+a+Pylons+application+for+Google+App+Engine There are some newer developments with pip and a newer appengine-monkey command (mentioned in the pylons-discuss thread), and the possibility of an unzip-and-go Pylons SDK, but I haven't tested them yet so I don't want to get into them just now. -- Mike Orr sluggos...@gmail.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: development staging request
Hi Alexander, On Wed, Feb 18, 2009 at 9:42 PM, Alexander Vasiljev a.a.vasil...@gmail.com wrote: Please read the following GAE feature request: http://code.google.com/p/googleappengine/issues/detail?id=1078 Share your thoughts and consider to support (star) it. I think this idea makes sense; we should consider this going forward. -Brett --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---