[google-appengine] ValueError on PhoneNumberProperty
I'm using the app-enging django helper Here are my models as defined in models.py. class PhoneInfo(BaseModel): name = db.StringProperty() phone = db.PhoneNumberProperty() class Person(BaseModel): is_verified = db.BooleanProperty() verification_token = db.StringProperty() verified_at = db.DateTimeProperty() first_name = db.StringProperty() last_name= db.StringProperty() email= db.EmailProperty() hashed_password = db.StringProperty() password_reset_token = db.StringProperty() phone_numbers= db.ListProperty(PhoneInfo) When I load up the shel and simply try to import, I get a ValueError. from laranevans.tracker.models import Person Traceback (most recent call last): File console, line 1, in module File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 12, in module class Person(BaseModel): File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 21, in Person phone_numbers= db.ListProperty(PhoneInfo) File /usr/local/google_appengine/google/appengine/ext/db/ __init__.py, line 2362, in __init__ raise ValueError('Item type %s is not acceptable' % item_type.__name__) ValueError: Item type PhoneInfo is not acceptable I'm sure it's something simple. I can't see it for the life of me though. Any help would be very welcome. 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: quick data upload?
On Mar 20, 10:20 pm, Kugutsumen kugutsu...@gmail.com wrote: Out of curiosity what is your upload bandwidth? Have you ever tried uploading a video on youtube or Google Video for example. For example in Indonesia, the best internet access you can get is via cable. They give you 3 mbit downstream but the upload bandwidth is ridiculously slow, only 128kbit or 256kbit. It takes forever to upload anything. To avoid this problem, I usually rsync everything on one of my dedicated host in Germany then upload from there. I'm about to upload 8 gig of data to App Engine; I'll share my results. Hi, since the data quota is 1GB, how could you upload 8 GB? --~--~-~--~~~---~--~~ 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
On Mar 11, 1:28 am, Jonathan Ultis jonathan.ul...@gmail.com wrote: 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 rawdata. 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, thedatastore 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. I met the same problem, uploaded less than 200GB raw data, and after a dairy quota reset, 1GB quota is reached! --~--~-~--~~~---~--~~ 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 do editing??
I have created a very simple django project that is using google datastore. In there I have created a simple user form with first name, last name, address fields. When user clicks on submit button then be able to save these entries in datastore table. What I want to do is to open the form in edit mode. I have seen the app engine patch sample but there I am not able to understand the editing part. Though i have placed an entry in urls.py for editing also. (r'^edituser$', 'my.views.edituser'), The class for showing the form to the user as created in views.py is given below class CreateUserForm(forms.Form): first_name = forms.CharField() last_name = forms.CharField() street_address = forms.CharField() Inside the edituser function in views.py def edituser(request, key): can anybody let me know how to display the form with filled entries so that the user can edit the same and update the datastore table. Thanks Arnie --~--~-~--~~~---~--~~ 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] why doesn't GQL where clause doesn't match
I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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: ValueError on PhoneNumberProperty
HI ListProperty tan take basic properties as contained types, i.e. str, db.Key, Int, but not model objects (se ethe docs for the full list) See http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html and have a look at the value type of ListProperty You are trying to put a model in the ListProperty, rather than than something that is an acceptable property or basic python tupe That list should be a list of keys I would think, (ie keys of PhoneInfo entities) Rgds T On Mar 21, 3:53 pm, Laran Evans laran.ev...@gmail.com wrote: I'm using the app-enging django helper Here are my models as defined in models.py. class PhoneInfo(BaseModel): name = db.StringProperty() phone = db.PhoneNumberProperty() class Person(BaseModel): is_verified = db.BooleanProperty() verification_token = db.StringProperty() verified_at = db.DateTimeProperty() first_name = db.StringProperty() last_name = db.StringProperty() email = db.EmailProperty() hashed_password = db.StringProperty() password_reset_token = db.StringProperty() phone_numbers = db.ListProperty(PhoneInfo) When I load up the shel and simply try to import, I get a ValueError. from laranevans.tracker.models import Person Traceback (most recent call last): File console, line 1, in module File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 12, in module class Person(BaseModel): File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 21, in Person phone_numbers = db.ListProperty(PhoneInfo) File /usr/local/google_appengine/google/appengine/ext/db/ __init__.py, line 2362, in __init__ raise ValueError('Item type %s is not acceptable' % item_type.__name__) ValueError: Item type PhoneInfo is not acceptable I'm sure it's something simple. I can't see it for the life of me though. Any help would be very welcome. 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: why doesn't GQL where clause doesn't match
One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Again, you're right. This is getting really embarrassing :-) Yes i'm mean forward slashes as used in urls, so '/work'. Thanks! On 21 mrt, 12:37, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
In fact you should do a manual loop comparison for i in Page.all(): if i.uri == uri: do something This will provide that uri you have and the value in the model match. T On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote: Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 Patch - dumpdata then loaddata
On Mar 20, 3:31 pm, Big Stu stu.dohe...@gmail.com wrote: Hi Waldemar, Thanks for following up, and thanks for all your hard work with App Engine Patch. I'm having a lot of fun learning about app engine and django in my spare time, and hope to one day move my full time career into this stuff. Django, GAE, and your stuff will have a huge hand in that. Anyway, the property I'm tryign to dump is DateTimeProperty: date = db.DateTimeProperty() That should work with the repository version. Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Can't access my application
When I try to access my application I get the following message: We're sorry... ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. We'll restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected, you might want to run a virus checker or spyware remover to make sure that your systems are free of viruses and other spurious software. If you're continually receiving this error, you may be able to resolve the problem by deleting your Google cookie and revisiting Google. For browser-specific instructions, please consult your browser's online support center. If your entire network is affected, more information is available in the Google Web Search Help Center. We apologize for the inconvenience, and hope we'll see you again on Google. What is the cause and how can this be fixed? --~--~-~--~~~---~--~~ 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] Cant Access My App - 403 Forbidden
Hi, I cannot my Application I am getting a Google error message saying, ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. Can anyone please help me?? Thanks, Arun Shanker Prasad --~--~-~--~~~---~--~~ 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 Bot Blocker
Hi Guys, I am slightly frustrated at the moment :) Google seems to be blocking all my requests with a: We're sorry... ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. So this means that I can't access the following services: - www.twollo.com: my machine is a cron scheduler to run timed jobs - www.itsabot.com: again my machine is a cron scheduler - www.thethumbthing.com: my machine is clearing down the datastore in prepartion for billing (and seeing as it is taking months to clear 10GB). I am curious as to what my options are. Paul. --~--~-~--~~~---~--~~ 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: Cant Access My App - 403 Forbidden
I am getting these too. 2009/3/21 Arun Shanker Prasad arunshan...@qburst.com Hi, I cannot my Application I am getting a Google error message saying, ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. Can anyone please help me?? Thanks, Arun Shanker Prasad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Google Bot Blocker
ditto , same problem here... but it is working good on some other pc , it is bad only on my testing pc -- where i test website robot like. -- and it is taking forever to restore.. :( On Mar 21, 5:17 pm, Paul Kinlan paul.kin...@gmail.com wrote: Hi Guys, I am slightly frustrated at the moment :) Google seems to be blocking all my requests with a: We're sorry... ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. So this means that I can't access the following services: -www.twollo.com:my machine is a cron scheduler to run timed jobs -www.itsabot.com:again my machine is a cron scheduler -www.thethumbthing.com:my machine is clearing down the datastore in prepartion for billing (and seeing as it is taking months to clear 10GB). I am curious as to what my options are. Paul. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Tim, that's great advice. I'm still getting used to having a interactive console for this debug sort of thing. With following code the console print my '/work' uri so, this way i get a match. from pages import models for i in models.Page.all(): if i.uri == '/work': print i.uri But when using the following, the filter method return None: from pages import models p = models.Page.all().filter('uri = ', '/work').get() print p.content Btw thanks for helping me like that! ;-) On 21 mrt, 12:49, Tim Hoffman zutes...@gmail.com wrote: In fact you should do a manual loop comparison for i in Page.all(): if i.uri == uri: do something This will provide that uri you have and the value in the model match. T On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote: Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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: quick data upload?
On Mar 21, 2:53 pm, neoedmund neoedm...@gmail.com wrote: On Mar 20, 10:20 pm,Kugutsumenkugutsu...@gmail.com wrote: Out of curiosity what is your upload bandwidth? Have you ever tried uploading a video on youtube or Google Video for example. For example in Indonesia, the best internet access you can get is via cable. They give you 3 mbit downstream but the upload bandwidth is ridiculously slow, only 128kbit or 256kbit. It takes forever to upload anything. To avoid this problem, I usually rsync everything on one of my dedicated host in Germany then upload from there. I'm about to upload 8 gig of data to App Engine; I'll share my results. Hi, since the data quota is 1GB, how could you upload 8 GB? If you are a billed user, quotas are different and adjustable: Incoming bandwidth 10.40 GBytes / 24h Stored Data: up to 41.00 GBytes / 24h Url Fetch: 1046.13 GBytes / 24h --~--~-~--~~~---~--~~ 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: ValueError on PhoneNumberProperty
Oh boy! That certainly puts the brakes on some of my ideas. Wow. That solves my immediate problem though. Thanks for the answer. On Mar 21, 5:44 am, Tim Hoffman zutes...@gmail.com wrote: HI ListProperty tan take basic properties as contained types, i.e. str, db.Key, Int, but not model objects (se ethe docs for the full list) Seehttp://code.google.com/appengine/docs/python/datastore/typesandproper... and have a look at the value type of ListProperty You are trying to put a model in the ListProperty, rather than than something that is an acceptable property or basic python tupe That list should be a list of keys I would think, (ie keys of PhoneInfo entities) Rgds T On Mar 21, 3:53 pm, Laran Evans laran.ev...@gmail.com wrote: I'm using the app-enging django helper Here are my models as defined in models.py. class PhoneInfo(BaseModel): name = db.StringProperty() phone = db.PhoneNumberProperty() class Person(BaseModel): is_verified = db.BooleanProperty() verification_token = db.StringProperty() verified_at = db.DateTimeProperty() first_name = db.StringProperty() last_name = db.StringProperty() email = db.EmailProperty() hashed_password = db.StringProperty() password_reset_token = db.StringProperty() phone_numbers = db.ListProperty(PhoneInfo) When I load up the shel and simply try to import, I get a ValueError. from laranevans.tracker.models import Person Traceback (most recent call last): File console, line 1, in module File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 12, in module class Person(BaseModel): File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 21, in Person phone_numbers = db.ListProperty(PhoneInfo) File /usr/local/google_appengine/google/appengine/ext/db/ __init__.py, line 2362, in __init__ raise ValueError('Item type %s is not acceptable' % item_type.__name__) ValueError: Item type PhoneInfo is not acceptable I'm sure it's something simple. I can't see it for the life of me though. Any help would be very welcome. 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: why doesn't GQL where clause doesn't match
Hi On Mar 21, 9:38 pm, Versluys Sander versluyssan...@gmail.com wrote: Tim, that's great advice. I'm still getting used to having a interactive console for this debug sort of thing. No probs Now I am really stumped ;-) Can you do a filter on any other attribute of that entity and see if you can fetch it that way ? Not sure what to look for now. Can you find any other page specifying the uri ? T With following code the console print my '/work' uri so, this way i get a match. from pages import models for i in models.Page.all(): if i.uri == '/work': print i.uri But when using the following, the filter method return None: from pages import models p = models.Page.all().filter('uri = ', '/work').get() print p.content Btw thanks for helping me like that! ;-) On 21 mrt, 12:49, Tim Hoffman zutes...@gmail.com wrote: In fact you should do a manual loop comparison for i in Page.all(): if i.uri == uri: do something This will provide that uri you have and the value in the model match. T On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote: Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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: ValueError on PhoneNumberProperty
Not knowing what you are trying to achive but Have you considered putting a refrence property in the phoneinfo that references the person The in the person you can get all the phoninfo entities by person.phoneinfo_set.all() Which returns all items referencing the Person. See ya T On Mar 21, 11:28 pm, Laran Evans laran.ev...@gmail.com wrote: Oh boy! That certainly puts the brakes on some of my ideas. Wow. That solves my immediate problem though. Thanks for the answer. On Mar 21, 5:44 am, Tim Hoffman zutes...@gmail.com wrote: HI ListProperty tan take basic properties as contained types, i.e. str, db.Key, Int, but not model objects (se ethe docs for the full list) Seehttp://code.google.com/appengine/docs/python/datastore/typesandproper... and have a look at the value type of ListProperty You are trying to put a model in the ListProperty, rather than than something that is an acceptable property or basic python tupe That list should be a list of keys I would think, (ie keys of PhoneInfo entities) Rgds T On Mar 21, 3:53 pm, Laran Evans laran.ev...@gmail.com wrote: I'm using the app-enging django helper Here are my models as defined in models.py. class PhoneInfo(BaseModel): name = db.StringProperty() phone = db.PhoneNumberProperty() class Person(BaseModel): is_verified = db.BooleanProperty() verification_token = db.StringProperty() verified_at = db.DateTimeProperty() first_name = db.StringProperty() last_name = db.StringProperty() email = db.EmailProperty() hashed_password = db.StringProperty() password_reset_token = db.StringProperty() phone_numbers = db.ListProperty(PhoneInfo) When I load up the shel and simply try to import, I get a ValueError. from laranevans.tracker.models import Person Traceback (most recent call last): File console, line 1, in module File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 12, in module class Person(BaseModel): File /Users/laran/Workspace/laranevans/../laranevans/tracker/ models.py, line 21, in Person phone_numbers = db.ListProperty(PhoneInfo) File /usr/local/google_appengine/google/appengine/ext/db/ __init__.py, line 2362, in __init__ raise ValueError('Item type %s is not acceptable' % item_type.__name__) ValueError: Item type PhoneInfo is not acceptable I'm sure it's something simple. I can't see it for the life of me though. Any help would be very welcome. 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: raise NotImplementedError(Only tempfile.TemporaryFile is available for use)
Venkat, You should try Miha's patch here: http://persistent.info/files/twitter_appengine.patch It patches twitter.py to work with GAE's restrictions. -Mahmoud On Mar 20, 8:19 am, venkat rambotla venkatrambo...@gmail.com wrote: hey hi tim, my twitter.py code goes like this #!/*usr*/bin/*python * # # Copyright 2007 *Google* Inc. All Rights Reserved. * '''A library that provides a python interface to the Twitter API''' * __author__ = *'dew...@google.com' * __version__ = *'0.5' * import base64 import md5 import os import *sys * import tempfile import time import urllib import urllib2 import urlparse import simplejson class *TwitterError*(Exception): * **'''Base class for Twitter errors''' * class *Status*(object): * *def *__init__*(*self*, created_at=None, id=None, text=None, user=None, now=None): *'''An object to hold a Twitter status message. * * This class is normally instantiated by the twitter.Api class and returned in a sequence. * * Note: Dates are posted in the form Sat Jan 27 04:17:38 + 2007 * * Args: created_at: The time this status message was posted id: The unique id of this status message text: The text of this status message relative_created_at: A human readable string representing the posting time user: A twitter.User instance representing the person posting the message now: The current time, if the client choses to set it. Defaults to the wall clock time. ''' * *self*.created_at = created_at *self*.id = id *self*.text = text *self*.user = user *self*.now = now * *def *GetCreatedAt*(*self*): *'''Get the time this status message was posted. * * Returns: The time this status message was posted ''' * return *self*._created_at * *def *SetCreatedAt*(*self*, created_at): *'''Set the time this status message was posted. * * Args: created_at: The time this status message was created ''' * *self*._created_at = created_at * *created_at = property(GetCreatedAt, SetCreatedAt, doc=*'The time this status message was posted.'*) * *def *GetCreatedAtInSeconds*(*self*): *'''Get the time this status message was posted, in seconds since the epoch. * * Returns: The time this status message was posted, in seconds since the epoch. ''' * return time.mktime(time.strptime(*self*.created_at, *'%a %b %d %H:%M:%S + %Y'*)) * *created_at_in_seconds = property(GetCreatedAtInSeconds, doc=*The time this status message was * *posted, in seconds since the epoch*) * *def *GetId*(*self*): *'''Get the unique id of this status message. * * Returns: The unique id of this status message ''' * return *self*._id * *def *SetId*(*self*, id): *'''Set the unique id of this status message. * * Args: id: The unique id of this status message ''' * *self*._id = id * *id = property(GetId, SetId, doc=*'The unique id of this status message.'*) * *def *GetText*(*self*): *'''Get the text of this status message. * * Returns: The text of this status message. ''' * return *self*._text * *def *SetText*(*self*, text): *'''Set the text of this status message. * * Args: text: The text of this status message ''' * *self*._text = text * *text = property(GetText, SetText, doc=*'The text of this status message'*) * *def *GetRelativeCreatedAt*(*self*): *'''Get a human redable string representing the posting time * * Returns: A human readable string representing the posting time ''' * fudge = 1.25 delta = int(*self*.now) - int(*self*.created_at_in_seconds) if delta (1 * fudge): * *return *'about a second ago' * elif delta (60 * (1/fudge)): * *return *'about %d seconds ago'* % (delta) elif delta (60 * fudge): * *return *'about a minute ago' * elif delta (60 * 60 * (1/fudge)): * *return *'about %d minutes ago'* % (delta / 60) elif delta (60 * 60 * fudge): * *return *'about an hour ago' * elif delta (60 * 60 * 24 * (1/fudge)): * *return *'about %d hours ago'* % (delta / (60 * 60)) elif delta (60 * 60 * 24 * fudge): * *return *'about a day ago' * else: * *return *'about %d days ago'* % (delta / (60 * 60 * 24)) * *relative_created_at = property(GetRelativeCreatedAt, doc=*'Get a human readable string representing' * *'the posting time'*) * *def *GetUser*(*self*): *'''Get a twitter.User reprenting the entity posting this status message. * * Returns: A twitter.User reprenting the entity posting this status message ''' * return *self*._user * *def *SetUser*(*self*, user): *'''Set a twitter.User reprenting the entity posting this status message. * * Args: user: A twitter.User reprenting the entity posting this status message ''' * *self*._user = user * *user = property(GetUser, SetUser, doc=*'A twitter.User reprenting the entity posting this ' * *'status message'*) *
[google-appengine] Re: Cant Access My App - 403 Forbidden
Any idea if there is a workaround? On Mar 21, 8:17 am, Paul Kinlan paul.kin...@gmail.com wrote: I am getting these too. 2009/3/21 Arun Shanker Prasad arunshan...@qburst.com Hi, I cannot my Application I am getting a Google error message saying, ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. Can anyone please help me?? Thanks, Arun Shanker Prasad --~--~-~--~~~---~--~~ 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: appcfg errno 13: Permission Denied
You should look at the stacktrace and look which files trigger the error. Depending on what the problem files are, rename/backup them temporary, and try again to see if this solves anything. I'm using Windows, I think it had something to do with user/group permissions on the file, but still not sure what it was exactly... On 28 feb, 06:11, UniqueDD fre...@gmail.com wrote: I'm also have such situations. I had removed Python and Google App engine. but this problem could also not solved. I had try uninstall python 2.6.1 and downgrade to 2.5.4. it also not works. So, anyone have ideas on this problem. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: why doesn't GQL where clause doesn't match
I've added you as developer just so you could write a GQL query or add entities yourself, if you want to... http://beta.nekudo.com/pages anyway thanks, you've already narrowed it down... On 21 mrt, 15:36, Tim Hoffman zutes...@gmail.com wrote: Hi On Mar 21, 9:38 pm, Versluys Sander versluyssan...@gmail.com wrote: Tim, that's great advice. I'm still getting used to having a interactive console for this debug sort of thing. No probs Now I am really stumped ;-) Can you do a filter on any other attribute of that entity and see if you can fetch it that way ? Not sure what to look for now. Can you find any other page specifying the uri ? T With following code the console print my '/work' uri so, this way i get a match. from pages import models for i in models.Page.all(): if i.uri == '/work': print i.uri But when using the following, the filter method return None: from pages import models p = models.Page.all().filter('uri = ', '/work').get() print p.content Btw thanks for helping me like that! ;-) On 21 mrt, 12:49, Tim Hoffman zutes...@gmail.com wrote: In fact you should do a manual loop comparison for i in Page.all(): if i.uri == uri: do something This will provide that uri you have and the value in the model match. T On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote: Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine is perfect to finally learn the language. --~--~-~--~~~---~--~~ 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 doesn't GQL where clause doesn't match
Ahhh I had wondered how you had defined it, but was thinking that maybe the indexes hadn't been built yet or something like that. Cheers T On Mar 22, 3:06 am, Versluys Sander versluyssan...@gmail.com wrote: Tim, couple minutes after I invited you as developer and while trying some queries, I suddenly realised what the problem was. I suddenly remembered from the docs that TextProperty does not get indexed so searching on that 'field' is not possible. I've changed the model accordingly and now i get the desired results. class Page(db.Model): title = db.StringProperty(required=True) uri = db.StringProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() Thanks again for hanging with me, it helped a lot! On 21 mrt, 15:36, Tim Hoffman zutes...@gmail.com wrote: Hi On Mar 21, 9:38 pm, Versluys Sander versluyssan...@gmail.com wrote: Tim, that's great advice. I'm still getting used to having a interactive console for this debug sort of thing. No probs Now I am really stumped ;-) Can you do a filter on any other attribute of that entity and see if you can fetch it that way ? Not sure what to look for now. Can you find any other page specifying the uri ? T With following code the console print my '/work' uri so, this way i get a match. from pages import models for i in models.Page.all(): if i.uri == '/work': print i.uri But when using the following, the filter method return None: from pages import models p = models.Page.all().filter('uri = ', '/work').get() print p.content Btw thanks for helping me like that! ;-) On 21 mrt, 12:49, Tim Hoffman zutes...@gmail.com wrote: In fact you should do a manual loop comparison for i in Page.all(): if i.uri == uri: do something This will provide that uri you have and the value in the model match. T On Mar 21, 8:41 pm, Tim Hoffman zutes...@gmail.com wrote: Just to test what is actually in I would do the following Page.all(): and iteraterate through the items and do a repr on the url to just check what is actually stored. And alternatley try us the above approach rather than gql as in Page.all().filter('uri = ',uri) Rgds T and iterate through all the pages and check uri with a On Mar 2 8:37 pm, Tim Hoffman zutes...@gmail.com wrote: Do you mean \work' or '/work' '\' is an escaping character T On Mar 21, 8:19 pm, Versluys Sander versluyssan...@gmail.com wrote: Yes that idd correct, i provided a wrong sample. But even when using correct named or positional parameters, it does nog match. Is it possible it has todo with escaping. The uri contains '\work'. I've used Django Forms the generate a form for the Page entity. Does it auto escape? Thanks! On 21 mrt, 10:54, Tim Hoffman zutes...@gmail.com wrote: One thing to check Your query as pasted is page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() I think it should read page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', uri=request.path).get() or page = db.GqlQuery('SELECT * FROM Page WHERE uri=:1', request.path).get () In otherwords you need to provide named keywords args if you name the param in the query or if you use positional args then number the args. You should actually be getting an error like File /home/timh/google_appengine/google/appengine/ext/gql/ __init__.py, line 539, in __GetParam reference) BadArgumentError: Missing named arguments for bind, requires argument id See ya T T On Mar 21, 6:14 pm, Versluys Sander versluyssan...@gmail.com wrote: I have a model: class Page(db.Model): title = db.StringProperty(required=True) uri = db.TextProperty(required=True) created = db.DateTimeProperty(auto_now_add=True) modified = db.DateTimeProperty(auto_now=True) content = db.TextProperty() And I've added an entity with '/work' as uri to the datastore. In my view: def show(request): page = db.GqlQuery('SELECT * FROM Page WHERE uri=:uri', request.path).get() if page is None: return http.HttpResponseNotFound() else: return respond(request, 'pages_show', {'content': request.path}) Even when request.path is exactly '/work', the query does not return a match. Thanks for any advice you can give me! And yes, i'm a python noob, App Engine
[google-appengine] Re: Random error in access to db: Error! class 'google.appengine.api.datastore_errors.Timeout'
I have these types of errors and guido suggested that they might be datastore time outs in disguise. To fix the problem put a try catch around the get() call and execute the statement again by using a while loop and an attempt counter, this counter is incremented in the catch clause. attempt = 1 while attempt3: try: get() call catch Error: attempt += 1 break else: # get failed multiple times pass 2009/3/21 Denis Moskalets denya@gmail.com: Hi. I have two identical applications. First -- for test purposes. Second -- real work app. So, few days ago i've tested pushing a lot of data from my computer to application. With the first app there were no problems. But with the second app i've got ~5 timeout errors! All in all, in the second app i regulary get this error. Sometimes, it occures on the first query to db in app! So, i think, it's a problem with a particular application. Appid: ctms-release. Can you check it? Example of traceback: Traceback (most recent call last): File /base/data/home/apps/ctms-release/1.332151903175237692/common/ zip-packages/django-1.0.2.zip/django/core/handlers/base.py, line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File /base/data/home/apps/ctms-release/1.332151903175237692/ctms/ rolesFunc.py, line 21, in wrapper if not request.user.is_active: File /base/data/home/apps/ctms-release/1.332151903175237692/common/ appenginepatch/ragendja/auth/middleware.py, line 19, in __get__ request._cached_user = User.get_djangouser_for_user(user) File /base/data/home/apps/ctms-release/1.332151903175237692/ctms/ models.py, line 306, in get_djangouser_for_user django_user = cls.gql(WHERE user = USER(:1),e).get() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1346, in get results = self.fetch(1) File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 1390, in fetch raw = self._get_query().Get(limit, offset) File /base/python_lib/versions/1/google/appengine/api/datastore.py, line 942, in Get return self._Run(limit, offset)._Next(limit) File /base/python_lib/versions/1/google/appengine/api/datastore.py, line 886, in _Run _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/datastore.py, line 1965, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout --~--~-~--~~~---~--~~ 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: Cant Access My App - 403 Forbidden
I was getting this last night just reading Google Andriod docs. I wonder if it wasn't some hiccup in googles infrastructure. 10 min later I could read the same docs . T On Mar 22, 2:05 am, Brandon Thomson gra...@gmail.com wrote: Any idea if there is a workaround? On Mar 21, 8:17 am, Paul Kinlan paul.kin...@gmail.com wrote: I am getting these too. 2009/3/21 Arun Shanker Prasad arunshan...@qburst.com Hi, I cannot my Application I am getting a Google error message saying, ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. Can anyone please help me?? Thanks, Arun Shanker Prasad --~--~-~--~~~---~--~~ 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: Cant Access My App - 403 Forbidden
Hi, I also think there was a disruption in Google's service. There was no indication of that in the Status site. I got the App back up again after an hour or so. Are you guys getting your apps now? Thanks, Arun Shanker Prasad. -- From: Tim Hoffman zutes...@gmail.com Sent: Sunday, March 22, 2009 4:36 AM To: Google App Engine google-appengine@googlegroups.com Subject: [google-appengine] Re: Cant Access My App - 403 Forbidden I was getting this last night just reading Google Andriod docs. I wonder if it wasn't some hiccup in googles infrastructure. 10 min later I could read the same docs . T On Mar 22, 2:05 am, Brandon Thomson gra...@gmail.com wrote: Any idea if there is a workaround? On Mar 21, 8:17 am, Paul Kinlan paul.kin...@gmail.com wrote: I am getting these too. 2009/3/21 Arun Shanker Prasad arunshan...@qburst.com Hi, I cannot my Application I am getting a Google error message saying, ... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now. Can anyone please help me?? Thanks, Arun Shanker Prasad --~--~-~--~~~---~--~~ 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] Blocking bad IPs
I've got a user with 61.175.215.214 IP address (registered in China) tring to hack my app and I was wandering what would be the best way to handle this kind of users? I've searched and found issue 718: http://code.google.com/p/googleappengine/issues/detail?id=718 But, for now, I'm thinking of redirecting them either to a login page or to some other URL. What would be the best URL to redirect unauthorized users who are trying to harm your app? Thank you, Sargis --~--~-~--~~~---~--~~ 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] my GAE domain is being redirected to an empty Google Sites homepage...
Anyone ever have this happen? I have a web app running on Google App Engine. I want to host it using a custom domain name. I set this up following the instructions available at http://www.google.com/support/a/bin/answer.py?hl=enanswer=91077#verified ... I actually did it for 3 different domains that I use as different faces for my app: This was working fine for several weeks until about 2 hours ago when one of the domains started forwarding to a blank Google Sites page.. )-: This URL - http://my.opensolar.org/ was rendering my Google App Engine web app earlier today. Now it displays the blank Google Sites page... any ideas why this is happening? When I log into Google Apps, I see all three domains associated with my GAE account. Two of them work fine, but a couple of hours - http://my.opensolar.org/ stopped working. ??? Any ideas, thoughts or suggestions would be greatly appreciated. Thanks! William --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---