[google-appengine] Re: Application instances seem to be too aggressively recycled
Heyo, On Tue, Mar 10, 2009 at 7:16 PM, cz czer...@gmail.com wrote: Actually, that is normal behavior. This has been discussed in previous threads. GAE seems to aggressively purge it's app cache, average app lifetime appears to be under 2 seconds. Appengine-patch may be marginally faster but both require Django1.x to be imported via zipimport, which is pretty expensive. Our app also exhibits this problem due to fairly low traffic, but there's not much that can be done as far as I can tell. Our app's dynamic pages contain lots of images also served via GAE, and since the browser can make many requests at once to load these, the app can be started up on several sever instances (probably due to load balancing) to deliver all the images. This can add up to a huge amount of CPU usage for just one page. Basically, the more traffic your app gets the faster it will be. Some people have suggested using a process somewhere to automatically make requests once per second or so to keep apps in the cache. But this is surely frowned upon by Google. Indeed, we are aware of this issue for some applications with certain load characteristics. We're taking steps to improve app caching to maximize instance lifetimes when it makes sense. Thanks for reporting all of your experiences with this behavior! -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 -~--~~~~--~~--~--~---
[google-appengine] Re: A question for Jaiku's developers, if they're watching..
Heyo, Good finds, peterk! pubsubhubbub uses some of the same techniques that Jaiku uses for doing one-to-many fan-out of status message updates. The migration is underway as we speak (http://www.jaiku.com/blog/2009/03/11/upcoming-service-break/). I believe the code should be available very soon. 2009/3/11 peterk peter.ke...@gmail.com: The app is actually live here: http://pubsubhubbub.appspot.com/ http://pubsubhubbub-subscriber.appspot.com/ (pubsubhubbub-publisher isn't there, but it's trivial to upload your own.) This suggests it's working on appengine as it is now. Been looking through the source, and I'm not entirely clear on how the 'background workers' are actually working..there are two, one for pulling updates to feeds from publishers, and one for propogating updates to subscribers in batches. But like I say, I can't see how they're actually started and running constantly. There is a video here of a live demonstration: http://www.veodia.com/player.php?vid=fCNU1qQ1oSs The background workers seem to be behaving as desired there, but I'm not sure if they were just constantly polling some urls to keep the workers live for the purposes of that demo, or if they're actually running somehow constantly on their own.. I can't actually get the live app at the urls above to work, but not sure if it's because background workers aren't really working, or because i'm feeding it incorrect urls/configuration etc. Ah sorry yeah I still have the old version of the source running on pubsubhubbub.appspot.com; I need to update that with a more recent build. Sorry for the trouble! It's still not quite ready for widespread use, but it should be soon. The way pubsubhubbub does fan-out, there's no need to write an entity for each subscriber of a feed. Instead, each time it consumes a task from the work queue it will update the current iterator position in the query result of subscribers for a URL. Subsequent work requests will offset into the subscribers starting at the iterator position. This works well in this case because it's using urlfetch to actually notify subscribers, instead of writing to the Datastore. For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? @bFlood: Indeed, the async_apiproxy.py code is interesting. Not much to say about that at this time, besides the fact that it works. =) -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 -~--~~~~--~~--~--~---
[google-appengine] urgent help needed:cann't update to GAE via http proxy
cmdset HTTP_PROXY=http://cache.mycompany.com:3128 cmdpython appcfg.py update myapp URLError: urlopen error [Errno 10061] No connection could be made because the t arget machine actively refused it Traceback (most recent call last): File C:\Program Files\Google\google_appengine\appcfg.py, line 60, in module run_file(__file__, globals()) File C:\Program Files\Google\google_appengine\appcfg.py, line 57, in run_fil e execfile(script_path, globals_) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1976, in module main(sys.argv) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1967, in main result = AppCfgApp(argv).Run() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1418, in Run self.action(self) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1879, in __call__ return method() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1669, in Update lambda path: open(os.path.join(basepath, path), rb)) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1213, in DoUpload missing_files = self.Begin() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1009, in Begin version=self.version, payload=self.config.ToYAML()) File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 312, in Send self._Authenticate() File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 344, in _Authenticate super(HttpRpcServer, self)._Authenticate() File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 233, in _Authenticate auth_token = self._GetAuthToken(credentials[0], credentials[1]) File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 177, in _GetAuthToken response = self.opener.open(req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 383, in open response = self._open(req, data) File C:\PROGRA~1\Python26\lib\urllib2.py, line 401, in _open '_open', req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\PROGRA~1\Python26\lib\urllib2.py, line 1138, in https_open return self.do_open(httplib.HTTPSConnection, req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 1105, in do_open raise URLError(err) urllib2.URLError: urlopen error [Errno 10061] No connection could be made becau se the target machine actively refused it PS:the version of gae is 1.1.9, python is 2.6 --~--~-~--~~~---~--~~ 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] What does your new project template look like?
I have found the included new_project_template to be woefully inadequate for getting a real project started. It's good for learning a hello world app, but when it comes to making apps ready for production, it's nice to make your own template. I wrote about the template that I use on my personal blog (http://www.alandelevie.com/ 2009/03/13/better-project-template-for-google-app-engine/ [there's a download link if you want]). It includes BeautifulSoup, some django templates, fixed tabs (why two spaces, Google, why?!), and some very basic but useful functions. I'd be interested to see what other people do about this. -Alan --~--~-~--~~~---~--~~ 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 occurs when i read chinese character from app engine database
The way you've phrased this implies that the web page has the word noner in it, which seems unlikely. Do you mean you aren't seeing the characters on the web page but instead some other characters are shown? In that case you should prob. check your encoding on the http level, in the html page that is returned and stuff like that. Also you should probably describe exactly what you did to change them to chinese characters on the off chance someone sees something incorrect in your process. Cheers, Bryan Rasmussen On Thu, Mar 12, 2009 at 5:34 AM, DiveIntoGAE taogf1...@gmail.com wrote: the data in my app engine database was english characters. today i directly use admin cosole to change them to chinese charactors, but they just show none in the web page.what is wrong? --~--~-~--~~~---~--~~ 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: A question for Jaiku's developers, if they're watching..
Just Curious, For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? So if you have over the 5000 limit in the subscribers would you write the entity twice? Each with differnt subscriber id's? Paul 2009/3/13 Brett Slatkin brett-appeng...@google.com Heyo, Good finds, peterk! pubsubhubbub uses some of the same techniques that Jaiku uses for doing one-to-many fan-out of status message updates. The migration is underway as we speak (http://www.jaiku.com/blog/2009/03/11/upcoming-service-break/). I believe the code should be available very soon. 2009/3/11 peterk peter.ke...@gmail.com: The app is actually live here: http://pubsubhubbub.appspot.com/ http://pubsubhubbub-subscriber.appspot.com/ (pubsubhubbub-publisher isn't there, but it's trivial to upload your own.) This suggests it's working on appengine as it is now. Been looking through the source, and I'm not entirely clear on how the 'background workers' are actually working..there are two, one for pulling updates to feeds from publishers, and one for propogating updates to subscribers in batches. But like I say, I can't see how they're actually started and running constantly. There is a video here of a live demonstration: http://www.veodia.com/player.php?vid=fCNU1qQ1oSs The background workers seem to be behaving as desired there, but I'm not sure if they were just constantly polling some urls to keep the workers live for the purposes of that demo, or if they're actually running somehow constantly on their own.. I can't actually get the live app at the urls above to work, but not sure if it's because background workers aren't really working, or because i'm feeding it incorrect urls/configuration etc. Ah sorry yeah I still have the old version of the source running on pubsubhubbub.appspot.com; I need to update that with a more recent build. Sorry for the trouble! It's still not quite ready for widespread use, but it should be soon. The way pubsubhubbub does fan-out, there's no need to write an entity for each subscriber of a feed. Instead, each time it consumes a task from the work queue it will update the current iterator position in the query result of subscribers for a URL. Subsequent work requests will offset into the subscribers starting at the iterator position. This works well in this case because it's using urlfetch to actually notify subscribers, instead of writing to the Datastore. For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? @bFlood: Indeed, the async_apiproxy.py code is interesting. Not much to say about that at this time, besides the fact that it works. =) -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 -~--~~~~--~~--~--~---
[google-appengine] Re: A question for Jaiku's developers, if they're watching..
I was just toying around with this idea yesterday Brett.. :D I did some profiling, and it would reduce the write cost per subscriber to about 24ms-40ms (depending on the number of subscribers you have..more = lower cost per avg), from 100-150ms. These are rough numbers with entities I was using, I have to do some more accurate profiling.. When I first thought about doing this, I was thinking :o I'll reduce write cost by a factor of hundreds!, but as it turns out, the extra index update time for an entity with a large number of list property entries eats into that saving significantly. But it still is a saving. Funnily enough the per subscriber saving increases (to a point) the more subscribers you have. I'm not sure if there's anything one can do to optimise index creation time with large lists.. I'm going to do some more work as well to see if there's an optimum 'batch size' for grouping subscribers together..at first blush, as mentioned above, it seems the larger the better (up to the per entity property/index cap of course). Thanks also for the insight on pubsubhubub..I eagerly await updates on that front :) Thank you!! On Mar 13, 8:05 am, Paul Kinlan paul.kin...@gmail.com wrote: Just Curious, For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? So if you have over the 5000 limit in the subscribers would you write the entity twice? Each with differnt subscriber id's? Paul 2009/3/13 Brett Slatkin brett-appeng...@google.com Heyo, Good finds, peterk! pubsubhubbub uses some of the same techniques that Jaiku uses for doing one-to-many fan-out of status message updates. The migration is underway as we speak (http://www.jaiku.com/blog/2009/03/11/upcoming-service-break/). I believe the code should be available very soon. 2009/3/11 peterk peter.ke...@gmail.com: The app is actually live here: http://pubsubhubbub.appspot.com/ http://pubsubhubbub-subscriber.appspot.com/ (pubsubhubbub-publisher isn't there, but it's trivial to upload your own.) This suggests it's working on appengine as it is now. Been looking through the source, and I'm not entirely clear on how the 'background workers' are actually working..there are two, one for pulling updates to feeds from publishers, and one for propogating updates to subscribers in batches. But like I say, I can't see how they're actually started and running constantly. There is a video here of a live demonstration: http://www.veodia.com/player.php?vid=fCNU1qQ1oSs The background workers seem to be behaving as desired there, but I'm not sure if they were just constantly polling some urls to keep the workers live for the purposes of that demo, or if they're actually running somehow constantly on their own.. I can't actually get the live app at the urls above to work, but not sure if it's because background workers aren't really working, or because i'm feeding it incorrect urls/configuration etc. Ah sorry yeah I still have the old version of the source running on pubsubhubbub.appspot.com; I need to update that with a more recent build. Sorry for the trouble! It's still not quite ready for widespread use, but it should be soon. The way pubsubhubbub does fan-out, there's no need to write an entity for each subscriber of a feed. Instead, each time it consumes a task from the work queue it will update the current iterator position in the query result of subscribers for a URL. Subsequent work requests will offset into the subscribers starting at the iterator position. This works well in this case because it's using urlfetch to actually notify subscribers, instead of writing to the Datastore. For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? @bFlood: Indeed, the async_apiproxy.py code is interesting. Not much to say about that at this time, besides the fact that it works. =) -Brett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google
[google-appengine] Re: App Engine SDK Cheat Sheet
I like it :) On Mar 13, 3:12 am, Amr Ellafi amrl...@gmail.com wrote: well done ! many thanks On Wed, Mar 11, 2009 at 10:28 PM, Let Delete My Apps davide.rogn...@gmail.com wrote: Thanks :-) On Mar 11, 7:44 pm, John skid...@google.com wrote: Hi All, Not sure if you saw the blog post this morning, but we created a cheat sheet: http://googleappengine.googlecode.com/files/google_app_engine_cheat_s... We'd love your feedback. Feel free to post it on this thread. If you're attending SxSW, please say hello! Cheers, John --~--~-~--~~~---~--~~ 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: jinja2 environment loading on each request to /
If you move Environment creation routine to another module it will be cached by Google, but only for few seconds (2-3?), so if your application does not get enough traffic you'd gain nothing from this. In my attempts to speedup things I discovered that only loader can be cached, but it has to be invalidated upon each new deployment so its key has to have application version added (this is how I did key versioning in my caching tools). Unfortunately, the gain from this caching approaches 0. And the last thing: Armin Ronacher, the guy behind Jinja, is aware of the problem and has some ideas on how to improve things on GAE, hopefully including template bytecode caching (this would be really super-nice!). On 13 Mar, 00:38, pedepy paul.ro...@gmail.com wrote: hey so i use jinja2 templates because they are better [no citation needed], but from what i understand, loading the jinja2 environment can be quite an expensive task. Through logging, I have found out that each request to / loads the environment over and over.. I have those routines in a seperate python script (not the one that app.yaml fowards requests to for /). anything im missing here ? I think this could be adding also an extra 1000 cpu ms on every requests ... (by the way, i have tried the cookbook's memcache technique and it only works locally, it fails on the google servers..) --~--~-~--~~~---~--~~ 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: A question for Jaiku's developers, if they're watching..
@peterk - if you don't need to query by the subscriber, you could alternatively pack the list of subscribers for a feed into a TextProperty so it is not indexed. I use TextProperty a lot to store large lists of geometry data and they work out pretty well @brett - async! looking forward to it in future GAE builds. thanks cheers brian On Mar 13, 5:37 am, peterk peter.ke...@gmail.com wrote: I was just toying around with this idea yesterday Brett.. :D I did some profiling, and it would reduce the write cost per subscriber to about 24ms-40ms (depending on the number of subscribers you have..more = lower cost per avg), from 100-150ms. These are rough numbers with entities I was using, I have to do some more accurate profiling.. When I first thought about doing this, I was thinking :o I'll reduce write cost by a factor of hundreds!, but as it turns out, the extra index update time for an entity with a large number of list property entries eats into that saving significantly. But it still is a saving. Funnily enough the per subscriber saving increases (to a point) the more subscribers you have. I'm not sure if there's anything one can do to optimise index creation time with large lists.. I'm going to do some more work as well to see if there's an optimum 'batch size' for grouping subscribers together..at first blush, as mentioned above, it seems the larger the better (up to the per entity property/index cap of course). Thanks also for the insight on pubsubhubub..I eagerly await updates on that front :) Thank you!! On Mar 13, 8:05 am, Paul Kinlan paul.kin...@gmail.com wrote: Just Curious, For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? So if you have over the 5000 limit in the subscribers would you write the entity twice? Each with differnt subscriber id's? Paul 2009/3/13 Brett Slatkin brett-appeng...@google.com Heyo, Good finds, peterk! pubsubhubbub uses some of the same techniques that Jaiku uses for doing one-to-many fan-out of status message updates. The migration is underway as we speak (http://www.jaiku.com/blog/2009/03/11/upcoming-service-break/). I believe the code should be available very soon. 2009/3/11 peterk peter.ke...@gmail.com: The app is actually live here: http://pubsubhubbub.appspot.com/ http://pubsubhubbub-subscriber.appspot.com/ (pubsubhubbub-publisher isn't there, but it's trivial to upload your own.) This suggests it's working on appengine as it is now. Been looking through the source, and I'm not entirely clear on how the 'background workers' are actually working..there are two, one for pulling updates to feeds from publishers, and one for propogating updates to subscribers in batches. But like I say, I can't see how they're actually started and running constantly. There is a video here of a live demonstration: http://www.veodia.com/player.php?vid=fCNU1qQ1oSs The background workers seem to be behaving as desired there, but I'm not sure if they were just constantly polling some urls to keep the workers live for the purposes of that demo, or if they're actually running somehow constantly on their own.. I can't actually get the live app at the urls above to work, but not sure if it's because background workers aren't really working, or because i'm feeding it incorrect urls/configuration etc. Ah sorry yeah I still have the old version of the source running on pubsubhubbub.appspot.com; I need to update that with a more recent build. Sorry for the trouble! It's still not quite ready for widespread use, but it should be soon. The way pubsubhubbub does fan-out, there's no need to write an entity for each subscriber of a feed. Instead, each time it consumes a task from the work queue it will update the current iterator position in the query result of subscribers for a URL. Subsequent work requests will offset into the subscribers starting at the iterator position. This works well in this case because it's using urlfetch to actually notify subscribers, instead of writing to the Datastore. For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals
[google-appengine] Re: What does your new project template look like?
I use another toolset (Werkzeug + Jinja2) so my projects are organized in different way, but I second your thoughts on default template usability. On 13 Mar, 08:16, adelevie adele...@gmail.com wrote: I have found the included new_project_template to be woefully inadequate for getting a real project started. It's good for learning a hello world app, but when it comes to making apps ready for production, it's nice to make your own template. I wrote about the template that I use on my personal blog (http://www.alandelevie.com/ 2009/03/13/better-project-template-for-google-app-engine/ [there's a download link if you want]). It includes BeautifulSoup, some django templates, fixed tabs (why two spaces, Google, why?!), and some very basic but useful functions. I'd be interested to see what other people do about this. -Alan --~--~-~--~~~---~--~~ 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 overwrite the default save method
Be aware that in current version save() contains code literally copied from put() so you'd like to have in your model class the code like: def put(self): # do something before save key = super(MyModel, self).put() # do something after save return key save = put On 13 Mar, 05:45, yucc yucc2...@gmail.com wrote: Hi all, I want to overwrite the default save method of the google.appengine.ext.db.Model so as to perform some special work each time the entity save(or update),I know in Django model this should be like this:(in the model definition) def save(self, force_insert=False, force_update=False): self.level = self.level+1 #I want to let the level property auto add super(User, self).save(force_insert, force_update) # Call the real save() method. #do_something_else() But, this doesn't work with google.appengine.ext.db.Model,it comes out that the Model's put method takes exactly 1 argument,so I omit them,like this: super(User, self).save(), Is that right? I was wondering how to construct a Model,as there's a init method: def __init__(self, parent=None, key_name=None, _app=None, _from_entity=False, **kwds) It seems super(User, self) is not right here Anyone could help ? --~--~-~--~~~---~--~~ 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: Why this is happening?
I have used your suggested code as given below def signin(request): return HttpResponseRedirect(overview(request)) def overview(request): return render_to_response('step1.html') but it is still not working any idea, why? 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 -~--~~~~--~~--~--~---
[google-appengine] Transaction collision AND AttributeError: 'Document' object has no attribute '_key_name'
I'm running into a frequent AttributeError: 'Document' object has no attribute '_key_name' Error when I try to delete multiple documents from the datastore (same entity group). This error only occurs when the delete request first runs into a Transaction collision. So for example I send these three delete requests in quick succession: DELETE /v1/documents/1-62?version=0 DELETE /v1/documents/1-1071?version=0 DELETE /v1/documents/1-64?version=0 The first two requests work fine. But in this case the third dumps a Transaction collision and then a no attribute '_key_name stack trace in the logs, and the delete fails to take place: 03-13 05:32AM 48.567 /v1/documents/1-1071?version=0 500 881ms 675ms- cpu 1kb WriteRoom/1.3.1 CFNetwork/342.1 Darwin/9.4.1,gzip(gfe) 64.222.203.28 - jesse [13/Mar/2009:05:32:49 -0700] DELETE /v1/ documents/1-1071?version=0 HTTP/1.1 500 1406 - WriteRoom/1.3.1 CFNetwork/342.1 Darwin/9.4.1,gzip(gfe) W 03-13 05:32AM 49.421 Transaction collision for entity group with key datastore_types.Key.from_path('Account', 1L, _app=u'hogbaywriteroom'). Retrying... E 03-13 05:32AM 49.422 'Document' object has no attribute '_key_name' Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 511, in __call__ handler.delete(*groups) File /base/data/home/apps/hogbaywriteroom/1.332025726958922683/ documents.py, line 168, in g return f(*new_args, **kw) File /base/data/home/apps/hogbaywriteroom/1.332025726958922683/ documents.py, line 198, in g return f(*new_args, **kw) File /base/data/home/apps/hogbaywriteroom/1.332025726958922683/ documents.py, line 492, in delete db.run_in_transaction(txn) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1654, in RunInTransaction DEFAULT_TRANSACTION_RETRIES, function, *args, **kwargs) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1745, in RunInTransactionCustomRetries result = function(*args, **kwargs) File /base/data/home/apps/hogbaywriteroom/1.332025726958922683/ documents.py, line 482, in txn deleted = Deleted(parent=document.parent_key(), document_key=str (document.key())) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 616, in key elif self._key_name: AttributeError: 'Document' object has no attribute '_key_name' The problem doesn't seem related to the documents server state. Right after that above failure I sent the same delete request again, and it worked fine that time. So I'm 99 percent sure that the cause is the transaction collision, but I'm not sure how to resolve it. Quite possibly I'm doing something wrong in my code, here's when my delete method looks like. If you need to see more code I'd be happy to provide the @require_document code to. Just let me know. @require_document def delete(self, user_account, document_account, document): version = self.request.get('version', None) version = None if version == None else int(version) if version == None: self.error(400) return def txn(): if version != document.version: raise ValueError, Version does not match document version deleted = Deleted(parent=document.parent_key(), document_key=str (document.key())) document_account.documents_size -= document.edits_size id_string = document.id_string() account_emails = document.get_account_emails() deleted.put() document.delete() document_account.put() clear_memcache(id_string, account_emails) try: document_id = document.key().id() db.run_in_transaction(txn) for edit in Edit.gql(WHERE ANCESTOR IS :1, db.Key.from_path ('Account', document_account.key().id(), 'Document', document_id)): edit.delete() if not api(self.request): self.redirect('/documents', False) except ValueError: self.error(409) except db.TransactionFailedError: self.error(409) Thanks for your help. Jesse --~--~-~--~~~---~--~~ 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: Cann't deploy my app to another domain after enable billing
I just tested using both methods, from the app engine dashboard and from the google apps domain console. In the 2 methods I still get the error message. Thanks for any help, Abner G. Jacobsen On Mar 12, 6:00 pm, Joe Gregorio j...@bitworking.org wrote: On Mar 11, 10:00 pm, Abner Jacobsen abner.jacob...@gmail.com wrote: Hi, Today I enabled billing in my app. After this when i try to add the app ID in another domain via the Google Apps dashboard I get this message: You do not have the permissions necessary to install this application. My question is: If I enable billing in an app this app cann't be used in another Google Apps domain ? That shouldn't be the case, I just tried this on a domain of my own with an App Engine application that I've turned billing on for and it worked. To add it, did you start at the App Engine console, or from within the Google App Dashboard for the domain you wanted to add it to? Thanks, -joe Thanks, Abner --~--~-~--~~~---~--~~ 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: A question for Jaiku's developers, if they're watching..
Unfortunately I do need to query them based on subscriber_id..so I can't pack them into a non-indexed property. Retrieving updates particular user has subscribed to is blazingly fast though...that's the gain in the end, I can query and fetch 1000 updates for a user sorted by date in 20-30ms-cpu. Love that :p In my hacky approaches previously where I tried to write once and then 'gather', I had to do lots of in-memory sorting and stuff, and even the results often wouldn't be totally accurate. I'm going to keep toying with the write end of things though..because in my full app, I may need to do write to other entities along with subscribers to do certain things I'm trying to achieve. So I'm going to be looking for every opportunity possible to optimise the cost of an 'update', which in my case may go beyond notifying subscribers. So any thoughts/ideas on further optimisation are more than welcome!! @Paul If you've more subscribers than will fit in one 'group' you'll need multiple groups, correct. So you'll have n writes, where n = number of subscribers/group-size, rounded up to the nearest whole number. Even with the costly index creation for each of these 'group' entities though, it should still work out a fair bit cheaper than writing a seperate entity for each subscriber. On Mar 13, 11:47 am, bFlood bflood...@gmail.com wrote: @peterk - if you don't need to query by the subscriber, you could alternatively pack the list of subscribers for a feed into a TextProperty so it is not indexed. I use TextProperty a lot to store large lists of geometry data and they work out pretty well @brett - async! looking forward to it in future GAE builds. thanks cheers brian On Mar 13, 5:37 am, peterk peter.ke...@gmail.com wrote: I was just toying around with this idea yesterday Brett.. :D I did some profiling, and it would reduce the write cost per subscriber to about 24ms-40ms (depending on the number of subscribers you have..more = lower cost per avg), from 100-150ms. These are rough numbers with entities I was using, I have to do some more accurate profiling.. When I first thought about doing this, I was thinking :o I'll reduce write cost by a factor of hundreds!, but as it turns out, the extra index update time for an entity with a large number of list property entries eats into that saving significantly. But it still is a saving. Funnily enough the per subscriber saving increases (to a point) the more subscribers you have. I'm not sure if there's anything one can do to optimise index creation time with large lists.. I'm going to do some more work as well to see if there's an optimum 'batch size' for grouping subscribers together..at first blush, as mentioned above, it seems the larger the better (up to the per entity property/index cap of course). Thanks also for the insight on pubsubhubub..I eagerly await updates on that front :) Thank you!! On Mar 13, 8:05 am, Paul Kinlan paul.kin...@gmail.com wrote: Just Curious, For other pub/sub-style systems where you want to write to the Datastore, the trick is to use list properties to track the subscribers you've published to. So for instance, instead of writing a single entity per subscriber, you write one entity with 1000-2000 subscriber IDs in a list. Then all queries for that list with an equals filter for the subscriber will show the entity. This lets you pack a lot of information into a single entity write, thus minimizing Datastore overhead, cost, etc. Does that make sense? So if you have over the 5000 limit in the subscribers would you write the entity twice? Each with differnt subscriber id's? Paul 2009/3/13 Brett Slatkin brett-appeng...@google.com Heyo, Good finds, peterk! pubsubhubbub uses some of the same techniques that Jaiku uses for doing one-to-many fan-out of status message updates. The migration is underway as we speak (http://www.jaiku.com/blog/2009/03/11/upcoming-service-break/). I believe the code should be available very soon. 2009/3/11 peterk peter.ke...@gmail.com: The app is actually live here: http://pubsubhubbub.appspot.com/ http://pubsubhubbub-subscriber.appspot.com/ (pubsubhubbub-publisher isn't there, but it's trivial to upload your own.) This suggests it's working on appengine as it is now. Been looking through the source, and I'm not entirely clear on how the 'background workers' are actually working..there are two, one for pulling updates to feeds from publishers, and one for propogating updates to subscribers in batches. But like I say, I can't see how they're actually started and running constantly. There is a video here of a live demonstration: http://www.veodia.com/player.php?vid=fCNU1qQ1oSs The background workers seem to be behaving as desired there, but I'm not sure if they were just constantly polling some urls to keep
[google-appengine] Re: jinja2 environment loading on each request to /
this is what i use: === from jinja2 import Environment, FunctionLoader , TemplateNotFound from google.appengine.api import memcache import os,logging VERSION = os.environ['CURRENT_VERSION_ID'] logging.warn (COLD START) def jinja2_template_loader(templatename): templatepath = os.path.abspath(os.curdir+'/ template/'+templatename) template = memcache.get(templatepath+VERSION) logging.debug( ..INSIDE JINJA) if template is None: try: logging.debug( ..READ) template = file(templatepath).read() memcache.set(templatepath+VERSION,template,time=500) except: template = None return template SERVER = os.environ.get('SERVER_SOFTWARE','').lower() if SERVER.startswith('devel'): logging.debug(...DEVEL JINJA) load_this = Environment(cache_size=0,loader = FunctionLoader (jinja2_template_loader)) else: load_this = Environment(loader= FunctionLoader (jinja2_template_loader)) def render(template_name,context): template = load_this.get_template(template_name) content = template.render(context) return content = if your app handlers are cached (ie via if __name__ == '__main__':main ()) this should be imported only once per server instance. It also caches templates both in memcache (for 8 minutes) and in instance memory (in case of local testing, templates are not cached in memory, so you can make changes and see the changes immediately) HTH Peter On Mar 13, 7:34 am, Jarek Zgoda jarek.zg...@gmail.com wrote: If you move Environment creation routine to another module it will be cached by Google, but only for few seconds (2-3?), so if your application does not get enough traffic you'd gain nothing from this. In my attempts to speedup things I discovered that only loader can be cached, but it has to be invalidated upon each new deployment so its key has to have application version added (this is how I did key versioning in my caching tools). Unfortunately, the gain from this caching approaches 0. And the last thing: Armin Ronacher, the guy behind Jinja, is aware of the problem and has some ideas on how to improve things on GAE, hopefully including template bytecode caching (this would be really super-nice!). On 13 Mar, 00:38, pedepy paul.ro...@gmail.com wrote: hey so i use jinja2 templates because they are better [no citation needed], but from what i understand, loading the jinja2 environment can be quite an expensive task. Through logging, I have found out that each request to / loads the environment over and over.. I have those routines in a seperate python script (not the one that app.yaml fowards requests to for /). anything im missing here ? I think this could be adding also an extra 1000 cpu ms on every requests ... (by the way, i have tried the cookbook's memcache technique and it only works locally, it fails on the google servers..) --~--~-~--~~~---~--~~ 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: urgent help needed:cann't update to GAE via http proxy
Try to search on this group or in Google.com - it was discussed many times here. -- Alex On Mar 13, 6:57 am, Coonay fla...@gmail.com wrote: cmdset HTTP_PROXY=http://cache.mycompany.com:3128 cmdpython appcfg.py update myapp URLError: urlopen error [Errno 10061] No connection could be made because the t arget machine actively refused it Traceback (most recent call last): File C:\Program Files\Google\google_appengine\appcfg.py, line 60, in module run_file(__file__, globals()) File C:\Program Files\Google\google_appengine\appcfg.py, line 57, in run_fil e execfile(script_path, globals_) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1976, in module main(sys.argv) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1967, in main result = AppCfgApp(argv).Run() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1418, in Run self.action(self) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1879, in __call__ return method() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1669, in Update lambda path: open(os.path.join(basepath, path), rb)) File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1213, in DoUpload missing_files = self.Begin() File C:\Program Files\Google\google_appengine\google\appengine \tools \appcfg.p y, line 1009, in Begin version=self.version, payload=self.config.ToYAML()) File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 312, in Send self._Authenticate() File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 344, in _Authenticate super(HttpRpcServer, self)._Authenticate() File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 233, in _Authenticate auth_token = self._GetAuthToken(credentials[0], credentials[1]) File C:\Program Files\Google\google_appengine\google\appengine \tools \appengin e_rpc.py, line 177, in _GetAuthToken response = self.opener.open(req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 383, in open response = self._open(req, data) File C:\PROGRA~1\Python26\lib\urllib2.py, line 401, in _open '_open', req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\PROGRA~1\Python26\lib\urllib2.py, line 1138, in https_open return self.do_open(httplib.HTTPSConnection, req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 1105, in do_open raise URLError(err) urllib2.URLError: urlopen error [Errno 10061] No connection could be made becau se the target machine actively refused it PS:the version of gae is 1.1.9, python is 2.6 --~--~-~--~~~---~--~~ 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 Select = 6 Datastore API calls?
Interesting question, would be great to hear from Google folks. -- Alex On Mar 12, 7:47 am, Peter Cicman pcic...@gmail.com wrote: Hi, i would like to deeper understand, how datastore calls counter works. Trying out simple query: samples = db.GqlQuery('SELECT * FROM Sample') produces 6 Datastore API Calls, whats the reason for this? Results: Write 100 instances = 100 API Calls, CORRECT Count 100 instances = 100 API Calls, CORRECT Read 100 instances = 6 API Calls, ??? Delete 100 instances = 13 API Calls, ??? - uses Select also... My very simple model: class Sample(db.Model): content = db.BlobProperty() content fore every instance is always 100B long. Somebody knows? 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 -~--~~~~--~~--~--~---
[google-appengine] Re: App Engine SDK Cheat Sheet
thank you On Mar 12, 2:44 am, John skid...@google.com wrote: Hi All, Not sure if you saw the blog post this morning, but we created a cheat sheet: http://googleappengine.googlecode.com/files/google_app_engine_cheat_s... We'd love your feedback. Feel free to post it on this thread. If you're attending SxSW, please say hello! Cheers, John --~--~-~--~~~---~--~~ 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: What does your new project template look like?
Is werkzeug a framework you have running with GAE? How does it organize your new projects? On Mar 13, 7:14 am, Jarek Zgoda jarek.zg...@gmail.com wrote: I use another toolset (Werkzeug + Jinja2) so my projects are organized in different way, but I second your thoughts on default template usability. On 13 Mar, 08:16, adelevie adele...@gmail.com wrote: I have found the included new_project_template to be woefully inadequate for getting a real project started. It's good for learning a hello world app, but when it comes to making apps ready for production, it's nice to make your own template. I wrote about the template that I use on my personal blog (http://www.alandelevie.com/ 2009/03/13/better-project-template-for-google-app-engine/ [there's a download link if you want]). It includes BeautifulSoup, some django templates, fixed tabs (why two spaces, Google, why?!), and some very basic but useful functions. I'd be interested to see what other people do about this. -Alan --~--~-~--~~~---~--~~ 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: App Engine SDK Cheat Sheet
Well done, it saves me some time in switching through the appengin docs. On Mar 11, 7:44 pm, John skid...@google.com wrote: Hi All, Not sure if you saw the blog post this morning, but we created a cheat sheet: http://googleappengine.googlecode.com/files/google_app_engine_cheat_s... We'd love your feedback. Feel free to post it on this thread. If you're attending SxSW, please say hello! Cheers, John --~--~-~--~~~---~--~~ 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] App Engine is Blocked by Chinse gov
Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for example http://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
I am in Shanghai China, I can't visit any App Engine website now. My friend in Singapore can not visit too. So I think it is Appengine Server or DNS's problem. DNS cache poisoning or someone DOS-ing google DNS? D:\Program Files\Google\google_appengineping yiqichao.appspot.com Pinging appspot.l.google.com [72.14.203.141] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 72.14.203.141: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), - Original Message - From: Haoyu Bai divine...@gmail.com To: google-appengine@googlegroups.com Sent: Friday, March 13, 2009 11:42 PM Subject: [google-appengine] App Engine is Blocked by Chinse gov Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for example http://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
On Fri, Mar 13, 2009 at 11:51 PM, yobin yyo...@gmail.com wrote: I am in Shanghai China, I can't visit any App Engine website now. My friend in Singapore can not visit too. So I think it is Appengine Server or DNS's problem. DNS cache poisoning or someone DOS-ing google DNS? D:\Program Files\Google\google_appengineping yiqichao.appspot.com Pinging appspot.l.google.com [72.14.203.141] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 72.14.203.141: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), Yes, change the IP that appspot.com resolve to may solve this. For exmaple I switched to OpenDNS and it resolve appspot.com to another address - cf-in-f141.google.com (74.125.19.141) and it can be accessed now. That's may not problem of GFW, but some Google server problem instead. Any idea? -- Haoyu Bai --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
- Original Message - From: Haoyu Bai divine...@gmail.com To: google-appengine@googlegroups.com Sent: Friday, March 13, 2009 11:58 PM Subject: [google-appengine] Re: App Engine is Blocked by Chinse gov On Fri, Mar 13, 2009 at 11:51 PM, yobin yyo...@gmail.com wrote: I am in Shanghai China, I can't visit any App Engine website now. My friend in Singapore can not visit too. So I think it is Appengine Server or DNS's problem. DNS cache poisoning or someone DOS-ing google DNS? D:\Program Files\Google\google_appengineping yiqichao.appspot.com Pinging appspot.l.google.com [72.14.203.141] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 72.14.203.141: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), Yes, change the IP that appspot.com resolve to may solve this. For exmaple I switched to OpenDNS and it resolve appspot.com to another address - cf-in-f141.google.com (74.125.19.141) and it can be accessed now. That's may not problem of GFW, but some Google server problem instead. Any idea? I draw back my words( My friend in Singapore can not visit too), he can visit App engine website now. 72.14.203.141 can be resolved in Singapore, but can't be resolved in Chian. I have no idea fore this, I hope Google can help us to solve these problem soon. --~--~-~--~~~---~--~~ 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] Sending Email trhu Google App engine
Hi All, I copy/paste the sample code from google app engine for sending email. I replaced the sender/to email address to my personal account which is not gmail After I uploaded my codes I tried but I was getting a 500 server error what I did was I changed the sender/to email address to my gmail account, I uploaded and tried again and it worked fine. My question is, is email sending only for gmail accounts? Please help. This is the codes that I pasted. from google.appengine.api import mail message = mail.EmailMessage(sender=supp...@example.com, subject=Your account has been approved)message.to = Albert Johnson albert.john...@example.com message.body = Dear Albert:Your example.com account has been approved. You can now visithttp://www.example.com/ and sign in using your Google Account toaccess new features.Please let us know if you have any questions.The example.com Team message.send() thanks catgon --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
You could try this in your hosts file: 209.85.171.141 yourapp.appspot.com On 3月13日, 下午11时42分, Haoyu Bai divine...@gmail.com wrote: Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for examplehttp://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai --~--~-~--~~~---~--~~ 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: python problems - HTTPSHandler
Hi, all i need (Linux - ubuntu) is to run python directly (path problems or ???) /usr/bin/python2.5 -u /home/.../Packages/GAE/google_appengine/ appcfg.py --email=myem...@gmail update MyApp (My first app in python :) On Feb 10, 12:30 am, Brett C. bcan...@gmail.com wrote: On Feb 9, 1:29 am, Haiming laihaim...@gmail.com wrote: I encountered similar problem on Ubuntu Linux: $ dev_appserver.py evaluation/ Traceback (most recent call last): File /usr/local/google/laihaiming/google_appengine/ dev_appserver.py,line55, in module execfile(script_path, globals()) File /usr/local/google/laihaiming/google_appengine/google/appengine/ tools/dev_appserver_main.py,line358, in module sys.exit(main(sys.argv)) File /usr/local/google/laihaiming/google_appengine/google/appengine/ tools/dev_appserver_main.py,line316, in main server = MakeRpcServer(option_dict) File /usr/local/google/laihaiming/google_appengine/google/appengine/ tools/dev_appserver_main.py,line277, in MakeRpcServer host_override=option_dict[ARG_ADMIN_CONSOLE_HOST]) File /usr/local/google/laihaiming/google_appengine/google/appengine/ tools/appcfg.py,line125, in __init__ self.opener = self._GetOpener() File /usr/local/google/laihaiming/google_appengine/google/appengine/ tools/appcfg.py,line338, in _GetOpener opener.add_handler(urllib2.HTTPSHandler()) AttributeError: 'module'objecthasnoattribute'HTTPSHandler' My python version is 2.5.4. Does anyone know the cause ? Check if the sslmoduleis built. If you can't import ssl then that's the problem and you need to follow the instructions others have pointed out in this thread on how to use apt-get to download themodule. --~--~-~--~~~---~--~~ 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] Installing python 3 google app editor doesn't recognise
Hello I am running leopoard OS ad am trying to run the google app editor. I downloaded python 3 and installed it. When i run the app editor it says that python isn't installed. Not sure what do any help appreciated. --~--~-~--~~~---~--~~ 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: SWFObject, dynamic URIs and flash.
You'll need to tell GEA to server swf as a static file. http://code.google.com/appengine/docs/python/gettingstarted/staticfiles.html For an example see this page that I created: http://food-prints.appspot.com/static/html/calculator.html Please let me know if you need more information. Sargis On Mar 12, 3:20 am, Tim Bull tim.b...@binaryplex.com wrote: Hi, I'm new to Google Appengine and Python programming and I've been having a problem that's just plain driving me nuts! I want to implement a RESTful style API, such that when I enter: http://url/trend/trendname A page loads and displays information about the trend. I've already successfully implemented Open Flash Chart 2 and SWFObject for a basic root URL. e.g. http://url/somepage?parameter=xyz Some of the logic is inside Django templates, but the end result of the relevant code outputed is this. script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LISTALLTIME }); /script So far so good. The relevant bit here is the OFC.swf reference which is the Open Flash Chart 2 SWF object we are executing. The problem comes when I move to a dynamic URL. Here's some of my APP.YAML and the WSGIApplication call. handlers: - url: /OFC.swf static_files: flash/OFC.swf upload: flash/OFC.swf - url: /.* script: twendly.py application = webapp.WSGIApplication( [('/', MainPage), (r'/trend/(.*)', GraphTrend), (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) So when I call http://appname/trend/trendname everything seems to work as it should and I end up with this in my HTML script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( /OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LIST1HR/watchmen }); /script Looks good BUT it it's not locating the OFC.swf file successfully. This has bugged me for days and tonight I figured I get rid of the trend directory and do it as a top level URI e.g. change my WSGI.Application call to this instead: application = webapp.WSGIApplication( [('/', MainPage), (r'/(.*)', GraphTrend), NOTE CHANGE ON THIS LINE (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) And call http://appname/trendname Everything works! Graph loads etc. - this all makes me think it's got something to do with relative URL paths, but I would of expected / OFC.SWF to load it from the root where the APP.YAML is redirecting. For reasons of elegance (and not getting stumped) I really want to implement it with the trend key word as part of the URI, but this seems to be a no go at the moment. I'm guessing I need a different configuration for my APP.YAML, but I'm really stuck. Can anyone help me out? Thanks! Tim --~--~-~--~~~---~--~~ 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] UpLoading Problem
I try to Uploading a simple appengine application , ex Helloworld google exemple but i receive seguent error : C:\google_appengine\appcfg.py:40: DeprecationWarning: the sha module is deprecated; use the hashlib module instead DIR_PATH, Scanning files on local disk. Initiating update. Email: marco.can...@gmail.com Password for marco.can...@gmail.com: 2009-03-13 11:50:24,828 ERROR appcfg.py:1235 An unexpected error occurred. Aborting. Traceback (most recent call last): File C:\google_appengine\google\appengine\tools\appcfg.py, line 1213, in DoUpload missing_files = self.Begin() File C:\google_appengine\google\appengine\tools\appcfg.py, line 1009, in Begin version=self.version, payload=self.config.ToYAML()) File C:\google_appengine\google\appengine\tools\appengine_rpc.py, line 303, in Send f = self.opener.open(req) File C:\Python26\lib\urllib2.py, line 389, in open response = meth(req, response) File C:\Python26\lib\urllib2.py, line 502, in http_response 'http', request, response, code, msg, hdrs) File C:\Python26\lib\urllib2.py, line 427, in error return self._call_chain(*args) File C:\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\Python26\lib\urllib2.py, line 510, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 403: Forbidden Error 403: --- begin server output --- You do not have permission to modify this app (app_id=u'helloworld'). --- end server output --- I'm at first use of appengine and i don't find a solution 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 -~--~~~~--~~--~--~---
[google-appengine] Re: App Engine is Blocked by Chinse gov
On Fri, Mar 13, 2009 at 11:59 PM, 秦锋 feng.w@gmail.com wrote: You could try this in your hosts file: 209.85.171.141 yourapp.appspot.com On 3月13日, 下午11时42分, Haoyu Bai divine...@gmail.com wrote: Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for examplehttp://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai But how can you let all users of your site to add such an entity in their hosts file? -- Haoyu Bai --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
On Sat, Mar 14, 2009 at 12:26 AM, Haoyu Bai divine...@gmail.com wrote: On Fri, Mar 13, 2009 at 11:59 PM, 秦锋 feng.w@gmail.com wrote: You could try this in your hosts file: 209.85.171.141 yourapp.appspot.com On 3月13日, 下午11时42分, Haoyu Bai divine...@gmail.com wrote: Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for examplehttp://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai But how can you let all users of your site to add such an entity in their hosts file? -- Haoyu Bai Bug filed at http://code.google.com/p/googleappengine/issues/detail?id=1144 -- Haoyu Bai --~--~-~--~~~---~--~~ 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: Transaction collision AND AttributeError: 'Document' object has no attribute '_key_name'
After a bit more playing and reading I think the route of my problem is that I've designed things so that there is a bit to much contention in my entity group, I probably shouldn't be running into failed transactions so much in the first place. My basic design is that each user account marks the root of an entity group. And the users documents are children of that group. This seems like a reasonable design to me, but the problem is that my sync client hits the group pretty hard. If the user deletes all their documents locally, then the sync client fires of a separate DELETE request for each document, all at the same time, and I think that's the root of the problem. So I guess I need to write a batch delete handler... or make the client send the DELETE requests in sequence, instead of all at once. Let me know if I'm missing a better way... still getting used to web programming. Jesse --~--~-~--~~~---~--~~ 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: UpLoading Problem
This is a pain. After running on GAE for months I had this problem yesterday. Lots of potential problems. First, make sure you have created a GAE account. Then make sure you know what the application name is on GAE. Then make sure the name of your application in the app.yaml file is equal to the name of the application on the host. You have most likely done all this, I know I did. My problem was cookies stored on my local machine. I have two gmail accounts because I am experimenting with sending emails from my application. I login to google using both gmail accounts which create cookies on my local machine. Appcfg.py does not like this. To make a long story short, on your desktop delete the .appcfg_cookies and .appcfg_nag files. On XP these are in, C:\Documents and Settings\%user%\then try again. Not sure this will solve your problem it did mine. Also if you try too many times (do not know how big too many is), appcfg.py creates a file in your application directory on your development machine that locks you from uploading no matter what. Appcfg.py simply stops running. Look for strange *.py files in your application directory and delete the files. SteveB -Original Message- From: google-appengine@googlegroups.com [mailto:google-appeng...@googlegroups.com] On Behalf Of MarcoCanali Sent: Friday, March 13, 2009 4:21 AM To: Google App Engine Subject: [google-appengine] UpLoading Problem I try to Uploading a simple appengine application , ex Helloworld google exemple but i receive seguent error : C:\google_appengine\appcfg.py:40: DeprecationWarning: the sha module is deprecated; use the hashlib module instead DIR_PATH, Scanning files on local disk. Initiating update. Email: marco.can...@gmail.com Password for marco.can...@gmail.com: 2009-03-13 11:50:24,828 ERROR appcfg.py:1235 An unexpected error occurred. Aborting. Traceback (most recent call last): File C:\google_appengine\google\appengine\tools\appcfg.py, line 1213, in DoUpload missing_files = self.Begin() File C:\google_appengine\google\appengine\tools\appcfg.py, line 1009, in Begin version=self.version, payload=self.config.ToYAML()) File C:\google_appengine\google\appengine\tools\appengine_rpc.py, line 303, in Send f = self.opener.open(req) File C:\Python26\lib\urllib2.py, line 389, in open response = meth(req, response) File C:\Python26\lib\urllib2.py, line 502, in http_response 'http', request, response, code, msg, hdrs) File C:\Python26\lib\urllib2.py, line 427, in error return self._call_chain(*args) File C:\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\Python26\lib\urllib2.py, line 510, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 403: Forbidden Error 403: --- begin server output --- You do not have permission to modify this app (app_id=u'helloworld'). --- end server output --- I'm at first use of appengine and i don't find a solution 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 -~--~~~~--~~--~--~---
[google-appengine] best transaction and then memcache.delete pattern
What's the best pattern for using transactions together with memcache.delete? def txn(): ... get, put some entities Option 1: do memcache.delete here db.run_in_transaction(txn) Option 2: do memcache.delete here Option 1 is to run do it in the last line(s) of the txn() function. Option 2 is to do it right after the successful call to run_in_transaction(). Option 2 feels a bit more correct, but Option 1 is convenient because I have easy access to the various model properties there. Are both options OK, or do that have different behavior that could cause problems? Thanks, Jesse --~--~-~--~~~---~--~~ 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: Data Storage Size - multiplier per object
Hi, There is no 'multiplier' per se on datastore storage. The issue is that we account for both the size of the data stored and the space taken by the indices for this data. As such, the amount of storage you use depends specifically on the types of indexes your application has. We are working on getting better documentation together that will give you a good idea on how you can account for the amount of storage an entity will take. Please note that the FAQ on this subject currently is _not_ correct and we will be updating it. -Marzia On Tue, Mar 10, 2009 at 9:28 AM, Jonathan Ultis jonathan.ul...@gmail.comwrote: I created a model with fixed content that requires ~250b serialized, including all field names, the key, and the kind name, and parent (None). I added 312000 of those to the datastore, for 75 megs of raw data. There are 8 indexable fields, The indices should require no more than 176 megs of additional space, if the indices don't do any sort of column compression. That's 250 megs of raw space. But, the data store reports 1GB of space used. That suggests perhaps 2x redundancy, plus a 50% fill rate in big table. Or, maybe just 4x redundancy. No idea. Anyhow, for now, take your raw object size including kind, key, field names, and field content, and multiply by 10x-15x, depending on how many indexable properties you have, to get your final storage size. --~--~-~--~~~---~--~~ 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] app-engine-patch MediaGenerator not generating any media!
Can anyone help please? I have been playing around with the app-engine-patch sample app and guestbook tutorial - great starter resource. Everything has gone very smoothly until I tried to create some stylesheets for my base template. I followed the instructions from the MediaGenerator page in the documentation and added 'styles.css' to myapp/media and /media. I also added this code to my /settings.py; # Combine media files COMBINE_MEDIA = { # Create a combined JS file which is called combined-en.js for English, # combined-de.js for German, and so on 'combined-%(LANGUAGE_CODE)s.js': ( # Integrate bla.js from myapp/media folder # You don't write media because that folder is used automatically 'myapp/bla.js', # Integrate morecode.js from media under project root folder 'global/morecode.js', ), # Create a combined CSS file which is called combined-ltr.css for # left-to-right text direction 'combined-%(LANGUAGE_DIR)s.css': ( 'myapp/style.css', # Load layout for the correct text direction 'global/layout-%(LANGUAGE_DIR)s.css', ), } I now get following line in my generated html page; link rel=stylesheet type=text/css href=/generated_media/media/1/ combined-ltr.css / but no 'combined-ltr.css' has actually been generated!? - should it have been? Any input most appreciated. Cheers P.S. I am very new to python and django so apologies if I have made a silly mistake --~--~-~--~~~---~--~~ 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] Call for Brazilian Developers
I don´t know if is there any rule about doing this but I think it´s not bad. This is for brazilian developers. Estou convocando desenvolvedores brasileiros de app engine para entrarem no grupo Google App Engine Brasil. O resto vocês já sabem: forum em português, discussão de problemas localização, etc. Senti a necessidade de haver uma comunidade App Engine brasileira assim como já existem de tantas outras coisas como Python, Django, nanana. Então, desenvolvedores brasileiros (e outros de língua portuguesa, por que não?) de plantão, vamos lá usar nossa nova ortografia para falar de App Engine :-) http://groups.google.com/group/google-appengine-brasil --~--~-~--~~~---~--~~ 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: StingListProperty and bulkLoad
you could write text in CSV file like this: [str1, str2, str3] this will be parsed into stringlist. On 1月17日, 下午10时58分, jackson.h.mil...@gmail.com jackson.h.mil...@gmail.com wrote: Documentation onbulkLoadis sparse. I have found a couple of blog posts that have been helpful and I have my bulkLoaders running. Where I am stuck is in how tobulkLoada StringListProperty element. Is there a format that I can put in the CSV that will get parsed into a list? --~--~-~--~~~---~--~~ 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 overwrite the default save method
You may want to look at get_value_for_datastore here: http://code.google.com/appengine/articles/extending_models.html This gets called in the course of a put, and can be used to accomplish other actions as well. On Mar 13, 5:06 am, Michael O'Brien mich...@mcobrien.org wrote: If you want to add something to __init__, you can do something like this: class A(BaseModel): def __init__(self, *args, **kwargs): # do something here, e.g. adding values to kwargs (property values) kwargs[canonical_name] = kwargs[name].lower().strip() super(A, self).__init__(*args, **kwargs) cheers Michael On Mar 13, 4:45 am, yucc yucc2...@gmail.com wrote: Hi all, I want to overwrite the default save method of the google.appengine.ext.db.Model so as to perform some special work each time the entity save(or update),I know in Django model this should be like this:(in the model definition) def save(self, force_insert=False, force_update=False): self.level = self.level+1 #I want to let the level property auto add super(User, self).save(force_insert, force_update) # Call the real save() method. #do_something_else() But, this doesn't work with google.appengine.ext.db.Model,it comes out that the Model's put method takes exactly 1 argument,so I omit them,like this: super(User, self).save(), Is that right? I was wondering how to construct a Model,as there's a init method: def __init__(self, parent=None, key_name=None, _app=None, _from_entity=False, **kwds) It seems super(User, self) is not right here Anyone could help ? --~--~-~--~~~---~--~~ 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] Passing variables.
I'm new to appengine. How would I pass a user id through the url, or is that advised? In other frameworks I would do something like www.something.com/page.xxx?var=12345. Now I want to keep my url clean, but don't know any other way to pass the info along. Can someone please help or point me in the right direction. thanks in advance. --~--~-~--~~~---~--~~ 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: UpLoading Problem
On Mar 13, 7:21 am, MarcoCanali marco.can...@gmail.com wrote: You do not have permission to modify this app (app_id=u'helloworld'). --- end server output --- I'm at first use of appengine and i don't find a solution Thanks ! You need to put your own application ID in app.yaml. It's very unlikely you managed to register helloworld. --~--~-~--~~~---~--~~ 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: Installing python 3 google app editor doesn't recognise
On Mar 12, 7:53 pm, stevweb16 swebste...@gmail.com wrote: Hello I am running leopoard OS ad am trying to run the google app editor. I downloaded python 3 and installed it. When i run the app editor it says that python isn't installed. Not sure what do any help appreciated. You can't use App Engine with Python 3. Install Python 2.5. --~--~-~--~~~---~--~~ 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: Sending Email trhu Google App engine
You can only send email from the address of the logged in user or an app administrator. On Mar 13, 5:59 am, catgon cg4hourgl...@gmail.com wrote: Hi All, I copy/paste the sample code from google app engine for sending email. I replaced the sender/to email address to my personal account which is not gmail After I uploaded my codes I tried but I was getting a 500 server error what I did was I changed the sender/to email address to my gmail account, I uploaded and tried again and it worked fine. My question is, is email sending only for gmail accounts? Please help. This is the codes that I pasted. from google.appengine.api import mail message = mail.EmailMessage(sender=supp...@example.com, subject=Your account has been approved)message.to = Albert Johnson albert.john...@example.com message.body = Dear Albert:Your example.com account has been approved. You can now visithttp://www.example.com/and sign in using your Google Account toaccess new features.Please let us know if you have any questions.The example.com Team message.send() thanks catgon --~--~-~--~~~---~--~~ 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] large imports/exports
Do you know if there's an easy way to do large imports/exports of data as needed for Google Appengine? --~--~-~--~~~---~--~~ 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 for bulkloader.py using PolyModel
Hi, Can you also post the code from the handler? Thanks, Marzia On Thu, Mar 12, 2009 at 8:30 PM, Webysther webyst...@gmail.com wrote: 1.Create entity class Contact(polymodel.PolyModel): phone_number = db.PhoneNumberProperty() address = db.PostalAddressProperty() Upload data... 2.Create entity class Person(Contact): first_name = db.StringProperty() last_name = db.StringProperty() mobile_number = db.PhoneNumberProperty() Upload data, opss!!! Error... Traceback (most recent call last): File C:\Program Files (x86)\Google\google_appengine\bulkloader.py, line 60, in module run_file(__file__, globals()) File C:\Program Files (x86)\Google\google_appengine\bulkloader.py, line 57, in run_file execfile(script_path, globals_) File C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py, line 2588, in module sys.exit(main(sys.argv)) File C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py, line 2584, in main auth_domain=auth_domain) File C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py, line 2467, in _PerformBulkload LoadConfig(config_file) File C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py, line 2376, in LoadConfig Loader.RegisterLoader(cls()) File H:\projects\ibge\import\uf.py, line 10, in __init__ ('co_regiao', int) File C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py, line 1880, in __init__ db.class_for_kind(kind) File C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\__init__.py, line 217, in class_for_kind raise KindError('No implementation for kind \'%s\'' % kind) google.appengine.ext.db.KindError: No implementation for kind 'Person' http://code.google.com/p/googleappengine/issues/detail?id=1133 Ideas? --~--~-~--~~~---~--~~ 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] query to get a resultset matching multiple attributes
I have a model: class Route(db.Model): name = db.StringProperty() code = db.StringProperty() currently_running = db.IntegerProperty() On my index page, I want to only display several of these routes, and on another page, display all the routes. I can easily do the latter. To display only certain routes, how can I make a query like this: routes = db.GqlQuery(SELECT * FROM Route WHERE code = 'BL' OR code = 'WL') Apperently Gql doesn't like that OR. --~--~-~--~~~---~--~~ 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 Select = 6 Datastore API calls?
Hi, It depends on how you are retrieving the results. If you use fetch() it should be a single query in the datastore. However, if you iterate over the query, it does batch the calls in groups of 20. -Marzia On Fri, Mar 13, 2009 at 7:03 AM, bFlood bflood...@gmail.com wrote: i thought I saw somewhere (maybe one of the IRC logs) that reads are batched in groups of 20 for each db call. it was one of the reasons they said to use a list of keys for get_by_key_name rather calling them individually. don't know for sure though cheers brian On Mar 13, 9:56 am, Sharp-Developer.Net alexander.trakhime...@gmail.com wrote: Interesting question, would be great to hear from Google folks. -- Alex On Mar 12, 7:47 am, Peter Cicman pcic...@gmail.com wrote: Hi, i would like to deeper understand, how datastore calls counter works. Trying out simple query: samples = db.GqlQuery('SELECT * FROM Sample') produces 6 Datastore API Calls, whats the reason for this? Results: Write 100 instances = 100 API Calls, CORRECT Count 100 instances = 100 API Calls, CORRECT Read 100 instances = 6 API Calls, ??? Delete 100 instances = 13 API Calls, ??? - uses Select also... My very simple model: class Sample(db.Model): content = db.BlobProperty() content fore every instance is always 100B long. Somebody knows? 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Unbelieveable jump in stored data.
Hi, Please see my response on this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/ba058742789f8008/00743e8062afa28a Short story: we are working on providing more insight as to how storage is calculated, and the reason you saw the jump in storage was that we are now including indexes in the storage calculations. -Marzia On Tue, Mar 10, 2009 at 6:06 AM, Josh Cronemeyer joshuacroneme...@gmail.com wrote: I actually already noticed a big jump (500MB) in stored data when they went live with billing, so I think I've already seen the increase described in that thread. This Jump is much larger and the only google activity it coincides with is some hardware upgrade. Hopefully I can get to the bottom of this, but I'm not sure how to figure out what is happening. On Mon, Mar 9, 2009 at 11:34 PM, Jonathan Ultis jonathan.ul...@gmail.comwrote: According to this message, google may be counting index sizes in the quota now. http://groups.google.com/group/google-appengine/msg/a16edddcc6db424f On Mar 9, 8:25 pm, Josh Cronemeyer joshuacroneme...@gmail.com wrote: This afternoon I had less than 1GB stored data, which took me several months to accumulate. This evening the dashboard is telling me I have used nearly 3GB stored data! It doesn't look like my traffic levels or number of users have changed significantly. This has to be wrong. Could it be related to the recent hardware changes mentioned on the app engine system status page? Has anyone else noticed anything with stored data reporting? --~--~-~--~~~---~--~~ 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: Stored Data figure suddenly way higher than Data Viewer suggests
Hi, Please see this thread for my response: http://groups.google.com/group/google-appengine/browse_thread/thread/ba058742789f8008/00743e8062afa28a -Marzia On Wed, Mar 11, 2009 at 4:01 AM, Michael O'Brien mich...@mcobrien.orgwrote: Hi, I'm still testing my app, so it only has a small amount of test data in it right now (maybe 200 small entities max). I hadn't paid much attention to the Stored Data figure on the dashboard page until now since today for the first time it looks like I actually owe money (1 cent, but hey it's something :). I'd guess the actual size of the data I have is under 1 MB, but the dashboard page says I'm using 2GB! The actual figure is 2.01 GB, which curiously is 1% of the 201 GB max. I have seven extra indexes and I did have more data in the datastore before, but deleted that at least a week ago. Still, I don't expect this could account for such a huge difference? Anyone else seeing similar behaviour? thanks! Michael --~--~-~--~~~---~--~~ 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: Apostrophe in key_name error
Hi, Something else has to be going on here, it works for me: class TestModel(db.Model): mystring = db.StringProperty() class TestPage(webapp.RequestHandler): def get(self): model = TestModel(key_name=test's, mystring=hello) model.put() retr = TestModel.get_by_key_name(test's) self.response.out.write(retr.mystring) I'm seeing the expected result and the entity as normal in the dataviewer. Perhaps you can provided some code? -Marzia On Thu, Mar 12, 2009 at 8:43 PM, Albert albertpa...@gmail.com wrote: Hi! I have an object that will be stored with a user-provided key_name. Everything works fine, until there is an apostrophe (') in the name. In the SDK, I can store an object in the datastore and retrieve it using get_by_key_name() even if it has an apostrophe. In production, I can only store the object (It's visible in the admin data viewer), but cannot retrieve it using get_by_key_name() if the key_name contains an apostrophe. Why is this? Thank you! P.S. I want the users to be able to enter an apostrophe since I am storing lists. And they most likely will name it as albert's list, raphael's list, etc... --~--~-~--~~~---~--~~ 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: The Guardian Open Platform
:-( On Mar 12, 10:26 pm, Let Delete My Apps davide.rogn...@gmail.com wrote: very good -- The Guardian Open Platformhttp://www.guardian.co.uk/open-platform openplatform-pythonhttp://code.google.com/p/openplatform-python/ A simple porting on GAE, is it possible? --~--~-~--~~~---~--~~ 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: Un-deploy an application
:-( On Mar 12, 9:39 pm, Let Delete My Apps davide.rogn...@gmail.com wrote: See my last app ;-)http://pyoohtml.appspot.com/let-delete-my-apps/home On Mar 12, 6:03 pm, Kegan ke...@kegan.info wrote: How do I stop or un-deploy an already deployed and running application? Also, can I delete a deployed application, so I can free the limited application slot ? --~--~-~--~~~---~--~~ 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: Customize Over Quota Page
Why not? On Mar 12, 9:31 pm, Let Delete My Apps davide.rogn...@gmail.com wrote: Using the JSON/JSONP services is useful this response: { errorMsg : Over quota, errorCode : 403 } See other:http://groups.google.com/group/google-appengine/browse_thread/thread/... Is it possible? --~--~-~--~~~---~--~~ 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: sdk
http://localhost:8080/_ah/admin See: http://code.google.com/appengine/docs/python/tools/devserver.html -- http://pyoohtml.appspot.com/let-delete-my-apps/home On Mar 13, 9:44 pm, Ronn Ross ronn.r...@gmail.com wrote: Does the appengine sdk have something included where you can look at the datastore? For example I'm having trouble displaying data, and I want to see if I writing data to the datastore. --~--~-~--~~~---~--~~ 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] Data Viewer - Kind button only displays 28 kinds?
In the Data Viewer, the button that allows you to select one of your Kinds seems to be limited to 28 items. I currently have 35 Kinds and I can't select some of them due to this limitation. (And I know there's data since I can use the manual Query option to get the data.) Is this a bug in the Data Viewer? A built in limitation that is too small? Joel --~--~-~--~~~---~--~~ 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: sdk
Hey thanks, this is great. I couldn't find it anywhere in the the docs. On Fri, Mar 13, 2009 at 4:50 PM, Let Delete My Apps davide.rogn...@gmail.com wrote: http://localhost:8080/_ah/admin See: http://code.google.com/appengine/docs/python/tools/devserver.html -- http://pyoohtml.appspot.com/let-delete-my-apps/home On Mar 13, 9:44 pm, Ronn Ross ronn.r...@gmail.com wrote: Does the appengine sdk have something included where you can look at the datastore? For example I'm having trouble displaying data, and I want to see if I writing data to the datastore. --~--~-~--~~~---~--~~ 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: large imports/exports
really , great ! have you sliced your data or did the upload at once ?? On Fri, Mar 13, 2009 at 10:47 PM, Let Delete My Apps davide.rogn...@gmail.com wrote: I've imported 87811 records using bulkload_client.py . . . On Mar 13, 7:53 pm, Ronn Ross ronn.r...@gmail.com wrote: Do you know if there's an easy way to do large imports/exports of data as needed for Google Appengine? --~--~-~--~~~---~--~~ 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: SWFObject, dynamic URIs and flash.
Sargis, Thanks for answering -- I've already tried this a few times. My current APP.YAML is included above, is this incorrectly specifying the SWF as a static file? Cheers, Tim On Fri, Mar 13, 2009 at 11:27 AM, Sargis Dallakyan food@gmail.comwrote: You'll need to tell GEA to server swf as a static file. http://code.google.com/appengine/docs/python/gettingstarted/staticfiles.html For an example see this page that I created: http://food-prints.appspot.com/static/html/calculator.html Please let me know if you need more information. Sargis On Mar 12, 3:20 am, Tim Bull tim.b...@binaryplex.com wrote: Hi, I'm new to Google Appengine and Python programming and I've been having a problem that's just plain driving me nuts! I want to implement a RESTful style API, such that when I enter: http://url/trend/trendname A page loads and displays information about the trend. I've already successfully implemented Open Flash Chart 2 and SWFObject for a basic root URL. e.g. http://url/somepage?parameter=xyz Some of the logic is inside Django templates, but the end result of the relevant code outputed is this. script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LISTALLTIME }); /script So far so good. The relevant bit here is the OFC.swf reference which is the Open Flash Chart 2 SWF object we are executing. The problem comes when I move to a dynamic URL. Here's some of my APP.YAML and the WSGIApplication call. handlers: - url: /OFC.swf static_files: flash/OFC.swf upload: flash/OFC.swf - url: /.* script: twendly.py application = webapp.WSGIApplication( [('/', MainPage), (r'/trend/(.*)', GraphTrend), (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) So when I call http://appname/trend/trendname everything seems to work as it should and I end up with this in my HTML script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( /OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LIST1HR/watchmen }); /script Looks good BUT it it's not locating the OFC.swf file successfully. This has bugged me for days and tonight I figured I get rid of the trend directory and do it as a top level URI e.g. change my WSGI.Application call to this instead: application = webapp.WSGIApplication( [('/', MainPage), (r'/(.*)', GraphTrend), NOTE CHANGE ON THIS LINE (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) And call http://appname/trendname Everything works! Graph loads etc. - this all makes me think it's got something to do with relative URL paths, but I would of expected / OFC.SWF to load it from the root where the APP.YAML is redirecting. For reasons of elegance (and not getting stumped) I really want to implement it with the trend key word as part of the URI, but this seems to be a no go at the moment. I'm guessing I need a different configuration for my APP.YAML, but I'm really stuck. Can anyone help me out? Thanks! Tim --~--~-~--~~~---~--~~ 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: query to get a resultset matching multiple attributes
On Mar 13, 12:16 pm, adelevie adele...@gmail.com wrote: routes = db.GqlQuery(SELECT * FROM Route WHERE code = 'BL' OR code = 'WL') Apperently Gql doesn't like that OR. try SELECT * FROM Route WHERE code IN ('BL', 'WL'). http://code.google.com/appengine/docs/python/datastore/gqlreference.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 -~--~~~~--~~--~--~---
[google-appengine] Re: Model.get_by_id()
On Mar 12, 3:56 am, herbie 4whi...@o2.co.uk wrote: Is there any performance difference in using Model.get_by_id(id) compared to Model.get(key) ? nope, no difference. --~--~-~--~~~---~--~~ 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] newbie : Template does not exist error
Hi, I took some hours now to find out the solution to my pb. I didn't find the solution on app engine forum, so I post it. When running localy : no pb (expect the media css is not loaded, I don't know why). But when I want to update it to server, there is a raise TemplateDoesNotExist, name. TemplateDoesNotExist: 404.html Hre is the traceback : Exception in request: Traceback (most recent call last): File /base/data/home/apps/antrivecov/1.332050104410580633/common/ zip-packages/django.zip/django/core/handlers/base.py, line 113, in get_response return callback(request, **param_dict) File /base/data/home/apps/antrivecov/1.332050104410580633/common/ zip-packages/django.zip/django/views/defaults.py, line 13, in page_not_found t = loader.get_template(template_name) # You need to create a 404.html template. File /base/data/home/apps/antrivecov/1.332050104410580633/common/ zip-packages/django.zip/django/template/loader.py, line 80, in get_template source, origin = find_template_source(template_name) File /base/data/home/apps/antrivecov/1.332050104410580633/common/ zip-packages/django.zip/django/template/loader.py, line 73, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: 404.html Why doesn't he find the template ? My settings are : TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.auth', 'django.core.context_processors.media', 'django.core.context_processors.request', ) TEMPLATE_DIRS = ( os.path.join(os.path.dirname(__file__), 'templates'), ) GLOBALTAGS = ( 'ragendja.templatetags.ragendjatags', And the template i want to load is very simple : test_template.html with p hello! /p content. Thanks for helping, i want so much to see my app on app engine! Arbi --~--~-~--~~~---~--~~ 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: 'module' object has no attribute 'Charfield'
Thanks I got it, I forgot a Charfield instead of StringProperty in my models... i could not see it for hours. On 12 mar, 18:35, Jeff S j...@google.com wrote: HiArbi, It looks like David Webb answered a similar issue in this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/... Did that resolve it? Thank you, Jeff On Mar 11, 2:33 pm,arbiarbin...@gmail.com wrote: Hi, I am a beginner, because I think it is a simple issue : class 'django.core.exceptions.ViewDoesNotExist': Tried start_page in module routes.views. Error was: 'module' object has no attribute 'CharField' In my routes.views I have the start_page def : def start_page(request): return render_to_response ('routes/index_search_template.html') Did I forget to import something? Is it a problem linked to template? Thanks a lot Arbi --~--~-~--~~~---~--~~ 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 usage goes up over time?
I imported about 3 million very simple records into appengine, using the bulk_uploader tool. The raw size of the input CSV was 85M. After upload, google showed my datastore quota usage as being about 0.16G -- a factor of 2 increase, but reasonable. I left the application for a few days, and logged back in to check on it: suddenly my datastore usage is pegged at 100% (1.0G)! First: why did my datastore usage grow over time? My application isn't writing records to the datastore, just serving queries against the static data set. Is it because Google created indexes? Can I stop that from happening? Second: how do I find out how much space my data is really taking up (according to the quota system). I'm reluctant to turn on billing until I know whether the suddenly-bloated version of my data is 1.01G or 16G -- and until I know whether it will continue to bloat further! http://cscott-geotest.appspot.com/ is the application URL; as you can see, it's a very simple application which returns a guessed zip code and country for the user based on the IP address their request comes from. The model looks like: class IP2PostalCode(BaseModel): Starting IPv4 address, as a 32-bit integer; ie, a.b.c.d is represented as 256*(256*(256*a+b)+c)+d ipStart = db.IntegerProperty(required=True) ISO-3166 alpha2 country code for this IPv4 address block. country = db.StringProperty() State (AdminCode1) for this block. state = db.StringProperty() City for this block. city = db.StringProperty() Postal code for this IPv4 address block. postcode = db.StringProperty() Can someone help me figure out what's going on here? --~--~-~--~~~---~--~~ 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: Twitter - rate limit exceeded
You could host one script on an other server that works as a proxy for your requests to twitter. --~--~-~--~~~---~--~~ 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: DownloadError: ApplicationError: 5 Using GData Provisioning API
Thanks for your response Scott, I guess it happens the same with all GData API's. It's kind of ironic, given that they are running in the same Google data centers. I'll be watching any progress on this. David On 11 mar, 00:08, scott scottums...@gmail.com wrote: David, I'm receiving the same error and similar results albeit with a different API. This happens when I try to create a new empty (not uploaded) spreadsheet. The spreadsheet shows up, but I still get ApplicationError:5. Until I can find the solution, I've chosen to just catch the exception and work around it. On my dev engine I receive a slightly different exception, ApplicationError:2 timeout. This happens on the request to google. Again, in dev even though I get the error the spreadsheet is created. The details of the request are listed below. The request looks to be in line with the API sample code athttp://groups.google.com/group/Google-Docs-Data-APIs/browse_frm/threa... and http://code.google.com/apis/documents/docs/2.0/developers_guide_proto I'll keep looking and will let you know if I find anything out. Scott operation str: POST url Url:http://docs.google.com/feeds/documents/private/full headers dict: {'Content-Length': '254', 'Content-Type': 'application/ atom+xml', 'User-Agent': 'None GData-Python/1.2.2'} data GDataEntry: ?xml version='1.0' encoding='UTF-8'? ns0:entry xmlns:ns0=http://www.w3.org/2005/Atom; ns0:category scheme=http://schemas.google.com/g/2005#kind; term=http://schemas.google.com/docs/2007#spreadsheet; /ns0:titleNoNameSheet/ns0:title /ns0:entry From the error log: File /base/data/home/apps/mamooproject/1.331984609576213456/gdata/ service.py, line 1147, in Post media_source=media_source, converter=converter) File /base/data/home/apps/mamooproject/1.331984609576213456/gdata/ service.py, line 1232, in PostOrPut headers=extra_headers) File /base/data/home/apps/mamooproject/1.331984609576213456/atom/ service.py, line 176, in request data=data, headers=all_headers) File /base/data/home/apps/mamooproject/1.331984609576213456/gdata/ auth.py, line 704, in perform_request return http_client.request(operation, url, data=data, headers=headers) File /base/data/home/apps/mamooproject/1.331984609576213456/gdata/ alt/appengine.py, line 144, in request method=method, headers=all_headers, follow_redirects=False)) File /base/python_lib/versions/1/google/appengine/api/urlfetch.py, line 273, in fetch raise DownloadError(str(e)) DownloadError: ApplicationError: 5 On Mar 9, 7:03 pm, DavidCifuentesdavid.cifuen...@eforcers.com wrote: Hello, I'm getting this error when I'm using the GData Provisioning API to create user accounts from GAE. The weird thing is that it works well on the development environment and even in the production server the ... --~--~-~--~~~---~--~~ 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: SWFObject, dynamic URIs and flash.
Tim, In your app.yal you wrote: - url: /OFC.swf static_files: flash/OFC.swf upload: flash/OFC.swf replace this with the followoing if you want to serve OFC.swf from / - url: /OFC.swf static_files: /OFC.swf upload: /OFC.swf If you are planning to add other static files, and unless you have to put them in /, its better to declare static_dir and put this kind of files there. Adding static_files is ok for files like sitemap or robot.txt, but to avoid adding new lines for every new .swf added, it better to keep them under static dir. Cheers, Sargis On Mar 13, 2:57 pm, Tim Bull tim.b...@binaryplex.com wrote: Sargis, Thanks for answering -- I've already tried this a few times. My current APP.YAML is included above, is this incorrectly specifying the SWF as a static file? Cheers, Tim On Fri, Mar 13, 2009 at 11:27 AM, Sargis Dallakyan food@gmail.comwrote: You'll need to tell GEA to server swf as a static file. http://code.google.com/appengine/docs/python/gettingstarted/staticfil... For an example see this page that I created: http://food-prints.appspot.com/static/html/calculator.html Please let me know if you need more information. Sargis On Mar 12, 3:20 am, Tim Bull tim.b...@binaryplex.com wrote: Hi, I'm new to Google Appengine and Python programming and I've been having a problem that's just plain driving me nuts! I want to implement a RESTful style API, such that when I enter: http://url/trend/trendname A page loads and displays information about the trend. I've already successfully implemented Open Flash Chart 2 and SWFObject for a basic root URL. e.g. http://url/somepage?parameter=xyz Some of the logic is inside Django templates, but the end result of the relevant code outputed is this. script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LISTALLTIME }); /script So far so good. The relevant bit here is the OFC.swf reference which is the Open Flash Chart 2 SWF object we are executing. The problem comes when I move to a dynamic URL. Here's some of my APP.YAML and the WSGIApplication call. handlers: - url: /OFC.swf static_files: flash/OFC.swf upload: flash/OFC.swf - url: /.* script: twendly.py application = webapp.WSGIApplication( [('/', MainPage), (r'/trend/(.*)', GraphTrend), (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) So when I call http://appname/trend/trendname everything seems to work as it should and I end up with this in my HTML script type=text/javascript src=js/swfobject.js/script script type=text/javascript swfobject.embedSWF( /OFC.swf, graph, 450, 450, 9.0.0, expressInstall.swf, { data-file: api/graph/LIST1HR/watchmen }); /script Looks good BUT it it's not locating the OFC.swf file successfully. This has bugged me for days and tonight I figured I get rid of the trend directory and do it as a top level URI e.g. change my WSGI.Application call to this instead: application = webapp.WSGIApplication( [('/', MainPage), (r'/(.*)', GraphTrend), NOTE CHANGE ON THIS LINE (r'/api/graph/(.*)/(.*)', GraphTrendValues), (r'/api/graph/(.*)', GraphValues), ], debug = True) And call http://appname/trendname Everything works! Graph loads etc. - this all makes me think it's got something to do with relative URL paths, but I would of expected / OFC.SWF to load it from the root where the APP.YAML is redirecting. For reasons of elegance (and not getting stumped) I really want to implement it with the trend key word as part of the URI, but this seems to be a no go at the moment. I'm guessing I need a different configuration for my APP.YAML, but I'm really stuck. Can anyone help me out? Thanks! Tim- 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] Re: App Engine SDK Cheat Sheet
The link seems broken, or incomplete in the original email... On Fri, Mar 13, 2009 at 6:49 PM, Sylvain sylvain.viv...@gmail.com wrote: I like it :) On Mar 13, 3:12 am, Amr Ellafi amrl...@gmail.com wrote: well done ! many thanks On Wed, Mar 11, 2009 at 10:28 PM, Let Delete My Apps davide.rogn...@gmail.com wrote: Thanks :-) On Mar 11, 7:44 pm, John skid...@google.com wrote: Hi All, Not sure if you saw the blog post this morning, but we created a cheat sheet: http://googleappengine.googlecode.com/files/google_app_engine_cheat_s... We'd love your feedback. Feel free to post it on this thread. If you're attending SxSW, please say hello! Cheers, John --~--~-~--~~~---~--~~ 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: App Engine is Blocked by Chinse gov
I am in China. For the past few days I have to switch to OpenDNS to visit google docs and google code. But www.yourowndomain.com seems suddenly work. I believe it has something to do with the GFW. Will On Sat, Mar 14, 2009 at 12:34 AM, Haoyu Bai divine...@gmail.com wrote: On Sat, Mar 14, 2009 at 12:26 AM, Haoyu Bai divine...@gmail.com wrote: On Fri, Mar 13, 2009 at 11:59 PM, 秦锋 feng.w@gmail.com wrote: You could try this in your hosts file: 209.85.171.141 yourapp.appspot.com On 3月13日, 下午11时42分, Haoyu Bai divine...@gmail.com wrote: Hi, Could any from China confirm this? I can't access any subdomain of appspot.com now, for examplehttp://socghop.appspot.com Traceroute show it is blocked at 202.112.61.214 . Seems it is blocked by GFW again! Too bad! Thanks! -- Haoyu Bai But how can you let all users of your site to add such an entity in their hosts file? -- Haoyu Bai Bug filed at http://code.google.com/p/googleappengine/issues/detail?id=1144 -- Haoyu Bai --~--~-~--~~~---~--~~ 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] Change Development Server logging level default to debug
IN order to display debug level info ,have to supply debug option like following dev_appserver.py coonay --debug how can i Change Development Server logging level default to debug --~--~-~--~~~---~--~~ 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] GAE and Google Apps Domain
Good Evening Everyone, Can a Google Apps Domain serve applications from mutiple GAE accounts? Thanks, Doug --~--~-~--~~~---~--~~ 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: Twitter - rate limit exceeded
Hmmm. My next app engine project _was_ going to be an app that relied on twitter. This doesn't sound good. As per your situation the app wouldn't hammer twitter, one request to the search API every 5-10 minutes or so. Given its not exactly an app engine problem did you try contacting twitter to see if they could build more 'smarts' into their rate limiting? Would be really interested to see if you end up resolving this issue, thanks for the heads up. Sorry I can't help. Cheers, lock On Mar 12, 10:43 pm, richyrich richyr...@gmail.com wrote: Hi there, I have been writing a simple little app that uses the Twitter API. It works perfectly on my local development server but it fails when I upload it because I get this error from Twitter: error=Rate limit exceeded. Clients may not make more than 100 requests per hour. ...even though my app only makes 1 request. what is happening is that other people apps must be using the Twitter API from the same IP address. does anyone know a good way around this other than hosting my app somewhere else? --~--~-~--~~~---~--~~ 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: Twitter - rate limit exceeded
Hmmm yes this is a difficult one. Neither Twitter nor Google are being unreasonable, and each GAE developer is probably performing a sane number of Twitter API requests but combined we are ruining it for everyone. Ohhh the solution? I can't think of a good solution Twitter could implement which wouldn't make it easy to circumvent their limit unreasonably. I do happen to have a hosted linux server a I can put a proxy script on, I guess I'm lucky there, but I am using GAE for its scaleability which my server certainly isn't. I don't need to go into all the reasons GAE is more scaleable than my own server :-) If anyone thinks of anything, I'd love to know. Rich 2009/3/14 lock lachlan.hu...@gmail.com Hmmm. My next app engine project _was_ going to be an app that relied on twitter. This doesn't sound good. As per your situation the app wouldn't hammer twitter, one request to the search API every 5-10 minutes or so. Given its not exactly an app engine problem did you try contacting twitter to see if they could build more 'smarts' into their rate limiting? Would be really interested to see if you end up resolving this issue, thanks for the heads up. Sorry I can't help. Cheers, lock On Mar 12, 10:43 pm, richyrich richyr...@gmail.com wrote: Hi there, I have been writing a simple little app that uses the Twitter API. It works perfectly on my local development server but it fails when I upload it because I get this error from Twitter: error=Rate limit exceeded. Clients may not make more than 100 requests per hour. ...even though my app only makes 1 request. what is happening is that other people apps must be using the Twitter API from the same IP address. does anyone know a good way around this other than hosting my app somewhere else? --~--~-~--~~~---~--~~ 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: App Engine SDK Cheat Sheet
http://googleappengine.googlecode.com/files/google_app_engine_cheat_sheet_119_1.pdf rich 2009/3/14 Will vocalster@gmail.com The link seems broken, or incomplete in the original email... On Fri, Mar 13, 2009 at 6:49 PM, Sylvain sylvain.viv...@gmail.com wrote: I like it :) On Mar 13, 3:12 am, Amr Ellafi amrl...@gmail.com wrote: well done ! many thanks On Wed, Mar 11, 2009 at 10:28 PM, Let Delete My Apps davide.rogn...@gmail.com wrote: Thanks :-) On Mar 11, 7:44 pm, John skid...@google.com wrote: Hi All, Not sure if you saw the blog post this morning, but we created a cheat sheet: http://googleappengine.googlecode.com/files/google_app_engine_cheat_s... We'd love your feedback. Feel free to post it on this thread. If you're attending SxSW, please say hello! Cheers, John --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---