[google-appengine] Sitewide 500 errors
I'm seeing the following error on all of my app engine sites including: https://appengine.google.com/ http://www.hogbaysoftware.com/ http://www.simpletext.ws/ ... - Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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: Sitewide 500 errors
Not sure what is going on exactly. Maybe a local problem... though the rest of the web works. Anyway: https://appengine.google.com/ Now works for me. As do my appspot related URLS: http://hogbaysoftware.appspot.com/ http://simpletextws.appspot.com/ But I'm still seeing a sitewide 500 error when I try to access my sites through their normal URLS: http://www.simpletext.ws/ http://www.hogbaysoftware.com/ Same error message: - Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@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: Sitewide 500 errors
This appears to now be a local problem, at least for me. I'm on OS X using Safari. If I change to Firefox then my sites load. I cleared cache on Safari and still saw the problem. Then I did Reset Safari and that appears to have fixed the problem. Sorry for sounding the alarms when the problem was local. 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-appeng...@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: Sitewide 500 errors
Actually your site (www.bijout.com) loads for me in Safari, and I found that my own site loads if I switch to a different user on my computer. Is something in cookies / cache triggering this? I think it must be related to that. I said that resetting Safari fixed the problem for me... and it did. But now I see the problem again after logging into my Google Apps email account. So problem still not fixed for me. 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-appeng...@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: Sitewide 500 errors
Me too -- clearing cookies fixed the problem. Kinda strange, but whatever I think the problem is bigger then that... at least for me. I can fix the problem by clearning cookies, but the problem also comes back after a few minutes. Maybe after I've logged into one of my google accounts. 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-appeng...@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] javax.net.ssl.SSLHandshakeException
I use Google Checkout and recently (since Aug 29th) I've been seeing errors in the Google Checkout integration console. They look like this: We encountered an error trying to access your server at https://hogbaysoftware.appspot.com/googlecheckoutapicallback -- the error we got is javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake My app is a python app, (and the exception is java) so I think this error must be happening before the request gets into my code. Most requests are getting through... I was expecting this error to just go away, but it seems to be sticking around. Does anyone know what could be causing it, and how to fix the problem? 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] Help with storage quota reading
Dumb question, but just want to make sure that I'm getting this right. In my dashboard I see: Stored Data, $0.005/GByte-day, 0%, 0.07 of 201.00 GBytes, $0.00 / $1.00 Am I correct in interpurting this to say that I've used 0.07 GBytes (~72 MBytes) of storage so far? 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] How to handle MemoryError
I'm getting the following error in app engine: Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 509, in __call__ handler.post(*groups) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ documents.py, line 650, in post self.put(account_id, document_id) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ documents.py, line 297, in g return f(*new_args, **kw) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ documents.py, line 312, in g return f(*new_args, **kw) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ documents.py, line 683, in put patches = dmp.patch_toText(dmp.patch_make(version_content, content)) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ diff_match_patch.py, line 1364, in patch_make diffs = self.diff_main(text1, b, True) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ diff_match_patch.py, line 111, in diff_main diffs = self.diff_compute(text1, text2, checklines) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ diff_match_patch.py, line 177, in diff_compute diffs = self.diff_map(text1, text2) File /base/data/home/apps/hogbaywriteroom/1.335453192513689606/ diff_match_patch.py, line 346, in diff_map v_map1[d][(x, y)] = True MemoryError It's happening when the user submits two big files to diff. I can't seem to find any mention of this error in the forums, can someone tell me exactly what it means? It it possible to catch it, and continue? Or a recommended process for dealing with MemoryErrors? 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: Datastore problem?
The problem seems to be fixed now, for me anyway. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is class Body(db.Model): ok?
It sometimes takes a while for new entity types to be reflected in the Admin Console. Are the entities showing up now? No, I'm still seeing the same errors in the console. My app ID is hogbaytaskpaper. I'm doing a migration, extracting a big TextProperty from my Document model into a separate Body model. I'd like to complete this (and delete the existing TextProperty attribute from my Document model), but I'm worried since Body still isn't showing up in my console. And console still reports an error when I try to query for Body objects. Any other ideas for getting the console to recognize this new Body model? 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: Is class Body(db.Model): ok?
Sorry, I misread your original post. The issue here is that the only property theBodyentity has is a TextProperty, which is not indexed. It's a known bug (we're working on it!) that entities with no indexed properties do not show up in the production Admin Console. Your data is there, it's just that the admin console can't see it. If it's important that it show up in the admin console, you can add a dummy indexed property to the Model and re-put existing entities to add it. Nick, Ahhh thanks for your response. I'll go ahead with things, I don't really care about it showing up in the console app, I was just worried that there might be something wrong elsewhere. Glad to know there isn't. 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: Is class Body(db.Model): ok?
It sometimes takes a while for new entity types to be reflected in the Admin Console. Are the entities showing up now? No, I'm still seeing the same errors in the console. My app ID is hogbaytaskpaper. 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] Is class Body(db.Model): ok?
I've just added a new model class to my app that's defined like this: class Body(db.Model): content = db.TextProperty() It seems to be working fine in my server code, but for some reason it doesn't show up in the list of entities shown by the App Engine Console Data Viewer. Also when I run a direct query in the console for: SELECT * FROM Body I get a page that reports: Server Error A server error has occurred. Can someone help me figure out what is going on? 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: Is class Body(db.Model): ok?
Have you added any Body entities to your datastore? Sometimes I get HTTP 500 errors in the console viewer for models with no existing entities. Yes I've added a lot, and they seem to be working, I just don't see them in the console. I also have an Includes ancestors index that's serving Body entities. 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: Model design for wiki like index pages
One thing that comes to mind first is to use key_name for that purpose. Perhaps you can use pagenames as key_name when storing pages, you can use keys_only query for rendering the Index page. Thanks, I hadn't taken the time to learn about key queries, and they look like a great tool to have. But unfortunately I don't think they work for my case. The problem is that for my index page I actually want more information then just the page name, I need two properties actually, I need the page name, and it's version. I can't really store that information as a named key, because the version will be changing regularly. I guess at this point I'm just not going to worry about it until I see real world performance problems. And I'll try to address those with memcache. But long term I would (if it makes sense in the datastore architecture) like the option to select a subset of an entities properties. Does anyone know if this is already a feature request that I can vote on, or should I make a new request... and how best to word it. I'm not sure how efficient/possible it would be to read out a subset of properties from the datastore blob. But maybe a condition would be that the specified properties need to be stored in at least one index? If someone who knows a bit more about the possibilities of the datastore can direct me in the right direction, I'll write the request. 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] Model design for wiki like index pages
I have a wiki like app. The basic model is a page which has title(StringProperty) and a body (TextProperty) properties. It all seems to work well, but I'm not sure how well my model will scale. The problem I see is that I want to have an Index page, which lists all other pages. My concern is when a model object is loaded in GAE all property fields are also loaded in from the store at the same time. That would seem to post a problem with my app on index pages, because it would mean when someone visits the index page both the title (which I want) and body (which I don't need) for all pages would need to be loaded from the store. Loading the body in this case seems wasteful, and possibly very problematic performance wise on a site with many pages. My questions: 1. Is this a problem that other people are worrying about, should I worry about it? I could solve the problem by dividing my page model into two separate models... on that contained the title and a reference to another model which would contain page body. That should make the index page scale, but it complicates the rest of the app. I'd prefer to avoid that rout if possible. 2. Is there, or is there a future possibility to specify that certain fields in a model are lazy load, not fetched and returned in the initial query? 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] Is the new User.user_id() property guaranteed to exist?
From the docs it seems that it is. But on the dev server User.user_id () returns None. And that's breaking some of my code, because I'd like to make the property where I store the ID as required, but I can't do that now since None is returned on the dev server. 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] https access through naked domain
I'm hosting my website (www.hogbaysoftware.com) through Google Apps and on Google App engine. Previously this site was hosted on another service that allowed naked domains, so I have many incoming links of the form http://hogbaysoftware.com. To fix these links I enabled forwarding on Godaddy.com and generally that fixed the problem. Now most naked domains get forwarded to www.hogbaysoftware.com. The problem is that I also have some secure https incoming links such as: https://hogbaysoftware.com/store And unfortunately these (naked domain links using https) aren't getting properly forwarded. When I enter the above link in my browser the browser just says Loading... for a long time and then responds with: Safari can’t open the page “https://hogbaysoftware.com/store” because the server where this page is located isn’t responding. Has anyone else noticed this problem. Can anyone recommend a solution? 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: https access through naked domain
I forgot on last bit of information. I no longer need https support for any page on my site. So in the above example I would be happy to have https://hogbaysoftware.com/store turn into http://www.hogbaysoftware.com/store, I don't need it forwarded to my secure appspot domain. 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: https access through naked domain
Nick, The problem here is likely that GoDaddy aren't serving redirects over port 443 (the HTTPS port). Even if they were, users would get dire warnings about broken SSL certificates. Thanks for your quick response. The only solution is to find someone who will serve 302 redirects and host your SSL certificate (someone you trust, naturally). I'm not sure if there are any commercial services that will do that. It's fairly straightforward to set up in Apache, if you have your own server somewhere, though. Thanks for your help. I guess I'll just ignore the problem for now... that's why I love Google App Engine so much, because I don't have to deal with servers, apache, SSL certificates... A! I don't want to go back to that world :) But I'll explain the problem to Godaddy and see if they have a suggestion. Thanks again for your answer. 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: URI Errors... logs?
Be sure to check the 'request' logs. If your app returned a non-200 response code but didn't log an error, it will not show up in the 'error' logs. Thanks! I didn't realize that. I'm guessing that it also won't log a response for 3XX errors? At least it seems not to. Does anyone know exactly what response codes report errors and what ones do not? Looking at my logs the error frequency reported in the dashboard seems to correspond to 401 (Unauthorized) responses from that URL. I'm guessing that must be it then. 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] URI Errors... logs?
I'm sorry if this has been covered elsewhere, but I can't seem to find it. In my apps Dashboard I see and errors box that looks like this: Errors URI Count % Errors /v1/documents 29 14% /v1/documents/3039-1/edits 1 100% I'm concerned about the first report with 29 errors. That's the main entry point into my application, and so I need to make it robust. The problem is I can't figure out what is going wrong. Though the errors are reported in the Dashboard I don't see any errors when I go look in the logs section. How can I find out more about what is causing those errors? 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] Google Accounts RSS feed authentication
I'm using the built in users authentication on my website. I really like it's simplicity, and I like the fact that many potential users will already have a Google Account, so they can use my site without having to create a new account. But I've run into a problem. I'd like to have protected (protected by users Google Account login) rss feeds on my site. But since (to my knowledge) the Google Account api authentication process (http:// tinyurl.com/atbzwk) isn't standard and supported in RSS readers I don't think it's possible to do this. Couple of thoughts. First suggestions? Is there some workaround? And if not: - It would be great if api login for google app engine apps could follow some standard. Or if not create a new standard that's appropriate. - Or if that's not possible, at least document the current api authentication process somewhere on google site to make it a bit easier to find and official. 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] 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: 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] 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] How to map URL containing commas to webapp handler
This is a pretty basic question, but I can't seem to figure it out. I'd like to map a URL that contains commas to a handler using the webapp framework. Something like this: application = webapp.WSGIApplication([ ('/versions/1,2', VersionsDifferenceHandler), ], debug=True) But that just gives me a 404. I've tried escaping the comma with a single or double \, but that doesn't help. Can someone give me a hint as to what I'm doing wrong? 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: Creating a short unique URL for an entity
You could use the id instead of the key, key().id, then you can get it back with just DocModel.get_by_id(id) You should be able to go straight to the doc without the parent account id /doc/12345 I'm not sure you can guarantee id uniqueness across your whole data store, but it should be unique for any given model? Thanks for your reply. If ID is unique across a particular kind that's good enough for me... I don't need a globally unique ID across all entity kinds, just across a specific entity kind. I'm still curious if anyone knows for sure if these IDs are unique across the entire store, or just unique across a given entity group. Very possibly I'm just missing it, but I can't seem to find this in the documentation. That would make me assume that they are globally unique, but then it is unclear to me what Key() has the parent entity group encoded in it for entities that are part of a given group. 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] Creating a short unique URL for an entity
I'm relatively new to web programming, so don't feel back about telling me the obvious :) I have a simple model consisting of Account entities that can own many document entities. I'd like to create a short as possible, globally unique URL scheme that I can use to access any document. For testing right now I'm just using the documents .key() in the URL. So for example my urls look something like this: /documents/ ag13cml0ZXJvb20tY29tchwLEgdBY2NvdW50GH4MCxIIRG9jdW1lbnQYiQEM But that's really long. I'm now trying to figure out the easiest way to make it shorter. One option that I'm considering is to just put the account id and document id in the URL separated by a dash like this: /documents/126-137 And then I can reconstruct the Key like this: db.Key.from_path('Account', account_key, 'Document', document_key) I haven't actually tried this yet... but I think it should work? My goal is a unique, short, permanent URL for every document in the system. If I'm going about this the wrong way or doing something dumb please let me know. 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: http HEAD responds with 405 in webapp framework
I've just added an issue for it here: http://code.google.com/p/googleappengine/issues/detail?id=869 If anyone else would like this too please star the issue. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] http HEAD responds with 405 in webapp framework
The webapp framework is fairly strict about http head requests. I'm not a web framework expert, but I think most web frameworks will implement head in terms of http GET if an explicit HEAD handler is not implemented. But webapp seems to require that head is explicit implemented in your handler or else it will return a 405 error. I would like HEAD to work on my site, but I don't really want to go and add special HEAD handlers to each of my controllers. This brings up two questions: 1. Would it make sense to modify the webapp framework so that HEAD requests fall back on GET if HEAD isn't implemented? 2. Related, in my app I've just added this default controller: class HEADHandler(webapp.RequestHandler): def head(self, *args): return self.get(*args) And I make all my other controllers inherit from it. This seems to work as desired, my controllers now correctly respond to HEAD requests. Is this an OK implementation, or can it cause problems that I'm not thinking about? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Google App Engine setup sequence...
I have an app hosted on google app engine at hogbaysoftware.appspot.com. I also have my domain hogbaysoftware.com setup with google apps. I'd like to connect the two so that I can access my app engine application at www.hogbaysoftware.com. A few months ago I set the same system up for another domain of mine (taskpaper.com), and it's working great. But it doesn't seem to be working, or at least I'm not getting any feedback when I try to set it up for my hogbaysoftware.com domain. I've tried setting things up from both ends (the app engine console) and also from the google apps dashboard. But in both cases nothing seems to happen after I go through the setup process. For example from the google apps dashboard I: 1. Click add more services 2. Enter my app id hogbaysoftware for the Google App Engine service. 3. Click the Add it now button. 4. Accept the agreement, type www for the web address. 5. Click Continue to setup url 6. Add a CNAME pair of www ghs.google.com in my DNS records 7. Click the i've completed these steps button. I don't get any errors, but after pressing that button I'm just sent back to the google apps dashboard without any confirmation message. The google app engine service isn't listed in my dashboard of services. And if I go to my google app engine console, and look at the versions view there's also no indication that any domains are being setup. What should I do next. I've just changed all my DNS records, and I'm worried that my site will go dead when people find my DNS pointing to ghs.google.com, but with nothing setup on the google side. Thanks for any ideas on what to do next. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google App Engine setup sequence...
Thank you very much for your quick reply. Your suggestion seems to have fixed the problem. I now see the app engine service in my google apps dashboard. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---