[google-appengine] Re: Still having trouble with high-cpu warnings for thumbnails.

2008-09-25 Thread Thomas Johansson

At Google IO I believe it was mentioned that TextProperty's are fine
for anything that you don't want indexed; They are no less efficient
than strings for short data. You might want to look into trying that
out with mime and type if you don't filter/order by them.

Other than that, I'd suggest trying to memcache the images, something
to the effect of:

id = int(id)
cache_key = 'ImageThumb:%i' % id
image = memcache.get(cache_key)
if not image:
image = ImageThumb.get_by_id(id)
if image:
memcache.set(cache_key, image, 3600)
if image:
self.response.headers['Content-Type'] = str(image.mime)
self.response.out.write(image.thumb)
else:
self.error(404)

In addition to that, I'd recommend you generate cache headers, in
particular etag and expiration. A good idea would be to generate the
etag when the ImageThumb is created, and then compare against that
from cache, before you write out the image. As an added bonus you
could store the etag on it's own in the cache, separate from the
image, and only pull out the actual image in case the etags don't
match.

On Sep 25, 4:59 am, iceanfire [EMAIL PROTECTED] wrote:
 I'm still having trouble with high-cpu warnings for thumbnails. This
 time around I took some profiler data to see what's causing it. But
 before I get into that here is the model i'm using:

 class ImageThumb(db.Model):
   binId = db.IntegerProperty()
   thumb = db.BlobProperty(default=None)
   building = db.ReferenceProperty(Buildings)
   apartment = db.ReferenceProperty(Apartments)
   mime = db.StringProperty()
   type = db.StringProperty(choices=['Floor Plan','Picture'])
   created_by =  db.UserProperty()

 So here's the Profiler cpu data:
 2538 function calls (2472 primitive calls) in 0.028 CPU seconds (rest
 of the data:http://docs.google.com/Doc?id=dgfxff5_30hc9tjsgg)

 But here's the warning: This request used a high amount of CPU, and
 was roughly 1.3 times over the average request CPU limit. High CPU
 requests have a small quota, and if you exceed this quota, your app
 will be temporarily disabled.

 Here's the megacycle info from the new Admin console: 1339mcycles 7kb

 Here's the code that pulls up the data for thumbnails:
 class Apt_thumb (webapp.RequestHandler):
     def get(self,id):
                 image = ImageThumb.get_by_id(int(id))
                 if image:
                         self.response.headers['Content-Type'] = 
 str(image.mime)
                         self.response.out.write(image.thumb)
                 else:
                         self.error(404)

 The images stored are 4kb each in the datastore. As I said, I had this
 problem earlier, so I had taken out the full image and put that in its
 own Model. Clearly that didn't help.

 Any idea what's causing this high-cpu error  how I can fix it?

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Denial of Service Attack on a GAE Application

2008-09-25 Thread Thomas Johansson

Marzia -

That is great news.

Will this also help with genuine traffic spikes? A simple application
I use to test, which does a single datastore fetch for 5 items that
are a few bytes each, and stores it in memcache for 10 seconds, can go
over quota by a simple ab -c 30 -n 1. I've tried with a very
gradual ramp up, being very careful not to trigger high cpu spawn
warnings, but regardless, after a while, it will just start spewing
them all over and the app dies. This is with a constant load after
build up, not a spike.

I'm hoping you can confirm that said fix will also solve that issue?

- Thomas

On Sep 24, 6:42 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi,

 We've identified an issue that can cause an application to hit one of our
 short-term quotas after a very sudden spike in traffic, which would prevent
 it from serving for a short time.  We're currently working on a fix to
 address this issue and expect to have it out shortly.

 On the broader issue of denial-of-service attacks, these are an unfortunate
 reality in the web world.  While we don't currently offer applications any
 specific protections against attacks of this nature, this is something we're
 interested in looking into for the future.  In the near-term, when we begin
 allowing developers to purchase computing resources beyond our free limits,
 we will provide a mechanism for reimbursement in the event of a DOS attack.

 -Marzia

 On Mon, Sep 22, 2008 at 3:41 PM, Sharp-Developer.Net 

 [EMAIL PROTECTED] wrote:

  Starred - I think it's gonna be even more impotant when we get paid
  service.
  --
  Alex
 http://sharp-developer.net/

  On Sep 20, 5:31 am, Tony Smith [EMAIL PROTECTED] wrote:
   Hi,

   I created an issue for this request. Please star it if you feel it's
   important to you.

  http://code.google.com/p/googleappengine/issues/detail?id=718

   Thanks,
   Tony
--~--~-~--~~~---~--~~
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: Django forms, what to do when all the data isn't present

2008-09-25 Thread Peter

That looks solid.  I'll give it a go

Thanks for helping a newbie!
Pete

On Sep 25, 6:04 am, iceanfire [EMAIL PROTECTED] wrote:
 I'm no Django expert, but here's what I do.
 Use 'exclude' to exclude stuff:
 class Message Form(djangoforms.ModelForm):
     class Meta:
         model = Message
         exclude = ['by', 'chat']

 Then under the post method of the class that receives the submitted
 data add:

 data = RealgroupForm(data=self.request.POST)
     if data.is_valid():
         entity = data.save(commit=False)
         entity.by = users.get_current_user()
         entity.chat = .. you get the idea
         entity.put()
         self.redirect('/message?message=sent)
      else:
          self.redirect...data invalid

 On Sep 24, 4:59 pm, Peter [EMAIL PROTECTED] wrote:

  Hi folks,
    I'm trying to write a basic chat application.

    my models currently look like

  ***
  # models.py

  from google.appengine.ext import db

  class Chat(db.Model):
      name = db.StringProperty

  class User(db.Model):
      name = db.StringProperty()
      ip = db.StringProperty()

  class Message(db.Model):
      chat = db.ReferenceProperty(Chat, required=True,
  collection_name='chat')
      by = db.ReferenceProperty(User, required=True,
  collection_name='by')
      date = db.DateTimeProperty(auto_now_add=True)
      message = db.StringProperty(multiline=True)

  from google.appengine.ext.db import djangoforms
  #from django import newforms as forms

  class MessageForm(djangoforms.ModelForm):
      class Meta:
          model = Message

  ***

    What I want is to have the message itself submitted via the form,
  but to populate the 'by' and 'chat' parameters.

    I figure the form will submit some sort of chatId and userId.  I'll
  need to map those across to User and Chat models.  Add them to the
  Message model, and then I'm ready to save.

    How should I go about this?

  Cheers,
  Peter
--~--~-~--~~~---~--~~
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: BadRequestError: Salary search with over 500K records

2008-09-25 Thread Thomas Johansson

Entities always have a key, available as entity.key(). In addition to
that, you can set a friendly key at construction only (can't be
changed or set later), using key_name. If you do not however set a
key_name, app engine will assign a numeric id, available as
entity.key().id().

In other words, change your pagination to something like: items =
Item.filter('key ', request.get('start')).fetch(1000), and pass the
key of the last item as the start parameter.

On Sep 25, 6:45 am, Venkatesh Rangarajan
[EMAIL PROTECTED] wrote:
 Folks,

 I have created a salary search application (http://payrate.appspot.com)

 I have uploaded around 500K records without an ID Field ( yeah,my Bad).

 Now i am running into BadRequestError: offset may not be above 1000 error
 when the results exceed 1000 and user is on the last page. I display 100
 records per page.

 Sample :http://payrate.appspot.com/?keyword=Engineerpage=800

 Any ideas on how I can update all the records with Index ? I know I could do
 that using page refreshes, but looking for some elegant solution.

 Rgds,
 Venkatesh
--~--~-~--~~~---~--~~
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: Django forms, what to do when all the data isn't present

2008-09-25 Thread iceanfire

No problem.
Take a look at this as well: 
http://code.google.com/appengine/articles/djangoforms.html

On Sep 25, 2:08 am, Peter [EMAIL PROTECTED] wrote:
 That looks solid.  I'll give it a go

 Thanks for helping a newbie!
 Pete

 On Sep 25, 6:04 am, iceanfire [EMAIL PROTECTED] wrote:

  I'm no Django expert, but here's what I do.
  Use 'exclude' to exclude stuff:
  class Message Form(djangoforms.ModelForm):
      class Meta:
          model = Message
          exclude = ['by', 'chat']

  Then under the post method of the class that receives the submitted
  data add:

  data = RealgroupForm(data=self.request.POST)
      if data.is_valid():
          entity = data.save(commit=False)
          entity.by = users.get_current_user()
          entity.chat = .. you get the idea
          entity.put()
          self.redirect('/message?message=sent)
       else:
           self.redirect...data invalid

  On Sep 24, 4:59 pm, Peter [EMAIL PROTECTED] wrote:

   Hi folks,
     I'm trying to write a basic chat application.

     my models currently look like

   ***
   # models.py

   from google.appengine.ext import db

   class Chat(db.Model):
       name = db.StringProperty

   class User(db.Model):
       name = db.StringProperty()
       ip = db.StringProperty()

   class Message(db.Model):
       chat = db.ReferenceProperty(Chat, required=True,
   collection_name='chat')
       by = db.ReferenceProperty(User, required=True,
   collection_name='by')
       date = db.DateTimeProperty(auto_now_add=True)
       message = db.StringProperty(multiline=True)

   from google.appengine.ext.db import djangoforms
   #from django import newforms as forms

   class MessageForm(djangoforms.ModelForm):
       class Meta:
           model = Message

   ***

     What I want is to have the message itself submitted via the form,
   but to populate the 'by' and 'chat' parameters.

     I figure the form will submit some sort of chatId and userId.  I'll
   need to map those across to User and Chat models.  Add them to the
   Message model, and then I'm ready to save.

     How should I go about this?

   Cheers,
   Peter
--~--~-~--~~~---~--~~
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] Zip django ?

2008-09-25 Thread Vitaliy

Hi

On djangocon conference Guido says that you can zip django (trunk or
1.0), so uploading to GAE will be faster..
so what should I do.. just put django.zip inside or what ?
--~--~-~--~~~---~--~~
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: Zip django ?

2008-09-25 Thread Alexander Pugachev
Take a look here: http://docs.python.org/lib/node853.html

2008/9/25 Vitaliy [EMAIL PROTECTED]


 Hi

 On djangocon conference Guido says that you can zip django (trunk or
 1.0), so uploading to GAE will be faster..
 so what should I do.. just put django.zip inside or what ?
 


--~--~-~--~~~---~--~~
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: Zip django ?

2008-09-25 Thread Vitaliy

Great news!
Thanks, man

Alexander Pugachev wrote:
 Take a look here: http://docs.python.org/lib/node853.html

 2008/9/25 Vitaliy [EMAIL PROTECTED]

 
  Hi
 
  On djangocon conference Guido says that you can zip django (trunk or
  1.0), so uploading to GAE will be faster..
  so what should I do.. just put django.zip inside or what ?
  
 
--~--~-~--~~~---~--~~
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: Still having trouble with high-cpu warnings for thumbnails.

2008-09-25 Thread Bryan A. Pendleton


-So are textProperties more efficient than StringProperties
because
they're not indexed?

You'd have to find the talk from Google IO to be sure. I believe
it
was the one about scalability, in the QA section. But yes, that is
my
understanding.


As I understand it, every field that's not a TextProperty or a
BlobProperty are implicitly indexed (this is how all = conditions are
dealt with in queries). So, whenever you write such an object, it will
take longer (because of the index updates).

Another way of thinking about it, is that if you never need to query
on a single value, make it a TextProperty or BlobProperty, if
possible.


-Wouldn't adding etag--while increasing efficiency if I have the
same
users loading the same image again and again--actually decrease
efficiency for users who are opening up an thumbnail for the first
time? In that situation,  I'd have another column for etags in my
datastore being requested w/ every query.

Yes, you absolutely should generate the etag when you save the
thumbnail, and save it in the model itself. Caching it separately
is
however still desirable as you can then avoid pulling the rest of
the
data into memory if it's not needed, or you can opt to not cache
the
rest of the data at all, instead only caching the etag, to be more
cache friendly.


A quick and easy hack for this is to generate the etag before creating
the Thumbnail model instance - and use that etag as the named key.
Then, you can do lookup and caching based on the etag alone, where
that makes sense. Unless you have some specific meaning in your ID
already, this should simplify the how to deal with etags question
quite a bit.

--~--~-~--~~~---~--~~
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: When is GAE going to support Django 1.0?

2008-09-25 Thread Michael Angerman
This is the latest update on this topic I believe, so the answer to your
question
is its still not there.

http://groups.google.com/group/google-appengine/msg/c3bb71cd63d8d32f

If other people have further information please let us know...

Thanks,
Michael I Angerman
Albuquerque, New Mexico
http://www.zrato.com


On Wed, Sep 24, 2008 at 2:48 AM, Marcel Overdijk
[EMAIL PROTECTED]wrote:


 Hi,

 As GAE 1.1.3 was released is Django 1.0 part of it?

 In case not, is there any news on updating the helper to Django 1.0?

 On 6 sep, 10:50, Waldemar Kornewald [EMAIL PROTECTED] wrote:
  Hey Alex,
 
  On 5 Sep., 22:58, Sharp-Developer.Net
 
  [EMAIL PROTECTED] wrote:
   Hey Waldemar,
 
   TheDjango1.0is realeased:
 http://www.djangoproject.com/weblog/2008/sep/03/1/
 
  We've already updated appenginepatch. You can even download a sample
  project (showing off our generic views support) that comes
 withDjango1.0and appenginepatch pre-installed, so you can skip the annoying
  install procedure and get started immediately:
 http://code.google.com/p/app-engine-patch/
 
   Any plan to include theDjango1.0into GAE image so app developers
   could exclude it from our deployment files?
 
   Could we expect the SDK to be update withDjango1.0included?
 
  Hopefully it'll be in the soon-to-be-released SDK 1.1.3.
 
  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] templates - offline yes, online no

2008-09-25 Thread acm

Hi readers,

I am having a probleme with my templates and the place they stay in.
Locally (dev_appserver) it works without any problems, but after I
uploaded my project to appengine (appcfg update) and visiting
http://goroutes.appspot.com the exception TemplateDoesNotExist:
Home.de.html is raised.

My templates reside in /style/templates/* (relative path). Within
app.yaml /style is declared as static_dir, but I think that should
not matter, because the template engine (especially the
google.appengine.ext.template.render function) works on system level,
not on urls. I feet the render function with an absolute path, which
is generated while a request happen. I also tried it with an relative
path with no luck. I am sure that the template exists, because
http://goroutes.appspot.com/style/templates/index.html is available. I
read that in static_dir's no scripts are allowed, but if I move /
style/templates to /templates and declare /templates as
static_dir it works, online and offline.

... and I do not really want to have templates under the projects root
folder.

So, are there any hints, sugesstions or solutions?

Regards,

acm.
--~--~-~--~~~---~--~~
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: ROR, PHP and Amazon Web services

2008-09-25 Thread Savraj Singh

Yeah, it would be nice to know Google's app-engine plans.

I'm a RoR and PHP developer learning Python because app-engine is
cool... But if app-engine is just going to support Rails in the
future, then I feel like I'm wasting my time now.

App engine team -- do let us know what you're planning!

- s

On Sep 23, 1:36 pm, student_thesis [EMAIL PROTECTED] wrote:
 Hello

 We are evaluating google app engine for one of our projects.

 Will ROR, PHP be supported, if so when is it in google app engine
 roadmap?

 Amazon S3 is creating a lot of buzz and picking up users in ec2, s3
 etc

 Does google have its heart in sharing its infrastructure long term?

 We are a business, and we are looking for some commitment from google
 on this.

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Dealing with lots of data -- any tips?

2008-09-25 Thread Savraj

So I have stored some data in the app-engine database, with new data
every 5 seconds.

example dataset:

ID - Time - Value
1 - 9/20/2008 16:00:00 - 100
2 - 9/20/2008 16:00:05 - 120
3 - 9/20/2008 16:00:10 - 130
4 - 9/20/2008 16:00:15 - 250
...
17278 - 9/21/2008 15:59:60 - 200
17279 - 9/21/2008 15:59:55 - 100
17280 - 9/21/2008 16:00:00 - 220

How do I get just 1000 values back that cover the entire recorded
period, so I can put them in a chart? What sort of query should I
construct?  I imagine it's something like, 'give me every 20th value'
-- but how do I express than in a query?

Thanks in advance for your kindness and consideration.

- s
--~--~-~--~~~---~--~~
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] How to pass additionap parameters to Form

2008-09-25 Thread Tiranox

How to pass additionap parameters to Form
For example:

class PhoneNumber(db.Model):
number = db.StringProperty()
phone_type = db.StringProperty(
choices=('work', 'cell'))

class PhoneNumberForm(djangoforms.ModelForm):
 v
class Meta:
model = PhoneNumber

def newp(request):

user = users.GetCurrentUser()
form = PhoneNumberForm(v='text')
return respond(request, user, 'addst', {'form': form})

--~--~-~--~~~---~--~~
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] Which framework is better for use with appengine with webservices

2008-09-25 Thread Carlos Delfino
 Hi appengineers!!!

My Name is Carlos Delfino, and new on App Engine.

I work on app for contact centers, and want put at google (server
and gadgets).

But for my application work, I need communicate with a WebServices(XML-RPC
and SOAP) make with php and java.

which Framework Is better for use xml-rpc and soap with google app engine?

thanks.


-- 
Carlos Delfino ([EMAIL PROTECTED])
Full Service Consultoria e Serviços
http://www.full.srv.br
---

Infra Estrutura para Redes de Computadores
Desenvolvimento de Softwares Especializados
Desenvolvimento de Sites Especializados

--~--~-~--~~~---~--~~
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: Facebook DownloadError

2008-09-25 Thread Adam Loving

I'm also seeing

DownloadError: ApplicationError: 3

intermittently when using urlfetch to call the Facebook API.

On Aug 27, 7:44 pm, llad [EMAIL PROTECTED] wrote:
 I am also having this issue with urlfetch.  It works 100% of the time
 in dev but can't get it to work at all in prod.  I'm gettingApplicationError: 
 2, when trying to fetchhttp://twitter.com/statuses/public_timeline.rss.

 File /base/data/home/apps/oddsurd/1.21/views.py, line 95, in
 _get_something
     feed_rss = urlfetch.Fetch(feed)
   File /base/python_lib/versions/1/google/appengine/api/urlfetch.py,
 line 219, in fetch
     raiseDownloadError(str(e))DownloadError:ApplicationError: 2

 On Aug 12, 11:27 pm, jeremysomething [EMAIL PROTECTED]
 wrote:

  Hi!

  I'm having a bit of trouble. I'm creating a facebook app that
  integrates with my google app engine project, and I'm having a hard
  time communicating with the facebook servers.

  It works from my dev instance (localhost), but once deployed, I'm
  getting some errors. This actually used to work once deployed as well,
  but the past day, I've been getting this error:

  Does anyone know whatDownloadError:ApplicationError:3means?

  full trace:

  Traceback (most recent call last):
    File /base/python_lib/versions/1/google/appengine/ext/webapp/
  __init__.py, line 501, in __call__
      handler.post(*groups)
    File /base/data/home/apps/w-w-w/1.150/main.py, line 642, in post
      self.updateFacebookProfile(newpost)
    File /base/data/home/apps/w-w-w/1.150/main.py, line 223, in
  updateFacebookProfile
      facebookIdentity.facebookUID)
    File string, line 9, in setFBML
    File /base/data/home/apps/w-w-w/1.150/facebook.py, line 378, in
  __call__
      return self._client('%s.%s' % (self._name, method), args)
    File /base/data/home/apps/w-w-w/1.150/facebook.py, line 783, in
  __call__
      result = urlfetch.fetch(FACEBOOK_URL, payload=post_data,
  method=urlfetch.POST, headers=headers)
    File /base/python_lib/versions/1/google/appengine/api/urlfetch.py,
  line 216, in fetch
      raiseDownloadError(str(e))
 DownloadError:ApplicationError:3

  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: High Amount CPU Quota should be removed

2008-09-25 Thread Ethan Post
In another post someone was exceeding the 5 second timeout with urlfetch
trying to get an RSS feed for a Google Docs account. I am planning on using
the Google Charts API and I wonder if I won't hit the same issue. However,
this got me thinking that writing a service like the Charting API on GAE is
quite improbable given what we presently know about CPU thresholds, however
we have to presume that the charting API that google offers is scalable. I
know the service is new and I don't mind the limits since I haven't actually
been locked out yet and I assume things will get better. I would encourage
Google to look at the CPU profiles for services like the charting API when
thinking about what limits to set on GAE.

On Tue, Sep 23, 2008 at 7:45 PM, Michael Hart [EMAIL PROTECTED]wrote:


 Hi all,

 Having been through a number of shared hosting situations, I'm gonna
 have to say that I disagree with most of the complaints on this thread.

 I think one of the main things not to lose sight of is the fact that
 GAE is intended to be a scalable platform, not a generic hosting
 solution. If you want or need a dedicated amount of CPU or memory,
 then GAE, at least as it stands today, is probably not what you want.
 The limits that are imposed in GAE are there to ensure that your app
 will scale. There are many apps that don't need to scale, and I would
 suggest that it's probably going to be easier for these to be
 developed on a more traditional platform.


--~--~-~--~~~---~--~~
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: How to specify a key_name parameter when bulk uploading?

2008-09-25 Thread James Little

I'm also interested in knowing how to do this; any ideas??

On Sep 8, 2:05 am, Peter Recore [EMAIL PROTECTED] wrote:
 I have read the bulk loader article, skimmed the bulkloader python
 source, searched this group, and experimented but I still can't figure
 out how to specify a key_name parameter when using the bulk loader.
 Please tell me what I'm missing, even if it's something obvious that
 will make me feel dumb, as it seems that specifying a key name would
 be very useful when bulk loading many types of data.
--~--~-~--~~~---~--~~
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: BadRequestError: Salary search with over 500K records

2008-09-25 Thread Venkatesh Rangarajan
Exactly my thought... One cannot assume that the keys are in ascending order
or Can we ?

On Thu, Sep 25, 2008 at 7:42 AM, Tony Arkles [EMAIL PROTECTED] wrote:


 Thomas, I think that solution will only work if the items are being
 returned such that their keys will be in ascending order (which in the
 general case seems like a very poor assumption).

 Did I miss something?

 On Sep 25, 1:14 am, Thomas Johansson [EMAIL PROTECTED] wrote:
  Entities always have a key, available as entity.key(). In addition to
  that, you can set a friendly key at construction only (can't be
  changed or set later), using key_name. If you do not however set a
  key_name, app engine will assign a numeric id, available as
  entity.key().id().
 
  In other words, change your pagination to something like: items =
  Item.filter('key ', request.get('start')).fetch(1000), and pass the
  key of the last item as the start parameter.
 
  On Sep 25, 6:45 am, Venkatesh Rangarajan
 
  [EMAIL PROTECTED] wrote:
   Folks,
 
   I have created a salary search application (
 http://payrate.appspot.com)
 
   I have uploaded around 500K records without an ID Field ( yeah,my Bad).
 
   Now i am running into BadRequestError: offset may not be above 1000
 error
   when the results exceed 1000 and user is on the last page. I display
 100
   records per page.
 
   Sample :http://payrate.appspot.com/?keyword=Engineerpage=800
 
   Any ideas on how I can update all the records with Index ? I know I
 could do
   that using page refreshes, but looking for some elegant solution.
 
   Rgds,
   Venkatesh
 
 
 


--~--~-~--~~~---~--~~
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] TypeError: 'NoneType' object is unsubscriptable

2008-09-25 Thread Venkatesh Rangarajan
Hi,

I am running a simple query

   keyword = self.request.get('keyword')

   if len(keyword) =0:
keyword='Google Engineer'

   query = search.SearchableQuery('Visa')
   query.Search(keyword)

 for result in query.Get(100, int(page)):
visas.append(result)

I keep running into the following error in some occasions. Not all.

Traceback (most recent call last):
  File /base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py,
line 496, in __call__
handler.get(*groups)
  File /base/data/home/apps/payrate/3.33/Main.py, line 142, in get
for result in query.Get(100, int(page)):
  File /base/python_lib/versions/1/google/appengine/api/datastore.py,
line 938, in Get
return self._Run(limit, offset)._Next(limit)
  File /base/python_lib/versions/1/google/appengine/api/datastore.py,
line 885, in _Run
*datastore_index.CompositeIndexForQuery(pb)[:-1])
TypeError: 'NoneType' object is unsubscriptable


Any idea on how to handle these and what is causing it? And why does it
happen only for certain keywords

Rgds,
Venkatesh

--~--~-~--~~~---~--~~
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] urlfetch User-agent not recognized by Yahoo shopping API

2008-09-25 Thread Adam Loving

I realize this is an issue for Yahoo Shopping, not Google, but posting
is disabled over at the Yahoo Shopping discussion board, and I have to
post it somewhere :).

When I call the Yahoo Shopping API using urlfetch from my app engine
app, I always receive a User-agent not valid return code. I am
guessing Yahoo just doesn't recognize the Google header yet, and have
not found a work-around.

Response: ?xml version=1.0 encoding=utf-8?
Error xmlns=urn:yahoo:api xmlns:xsi=http://www.w3.org/2001/
XMLSchema-instance xsi:schemaLocation=urn:yahoo:api
http://api.yahoo.com/Api/V1/error.xsd;
The following errors were detected:
MessageUser-agent not valid/Message
/Error
--~--~-~--~~~---~--~~
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: High Amount CPU Quota should be removed

2008-09-25 Thread mitnickcbc

Anyone has any idea how this warning message is calculated? Many of
the requests to your application are taking a very long time. Please
optimize these requests.

It seems I meet quota denials every time this one shows up. I'm unable
to tune anymore if I don't know how it is calculated.

There are several possible algorithms for this in my mind and I need
to know which one is used to be able to move forward:
1. Based on the total number of high CPU requests in a certain period
of time. And what's the CPU usage value to make a request counted in?
1200 mcycles? 1800, or anything else?
2. Based on total CPU consumed by these high CPU.
3. Based on response time.

However, no matter how much I tuned, it's just about time for me to
reach the load limit. Since 30% of my write requests will never
possible to fit the current high CPU bar. It also seems that the high
CPU quota is not increased with the other quota. So say assume 10% of
your requests are high CPU ones, and GAE only allows 1 high CPU
request per second, then you will not be able to scale beyond 10
requests per second, no matter how much CPU quota you have.

There are 3 solutions in my mind:
1. Raise the high CPU bar to fit real world needs like raising it to
10K mcycles.
2. Make the high amount CPU quota scalable and configurable instead of
a fixed number. Such as making it 30% of normal CPU quota. However, I
would still suggest to not even fix the percentage since every
application is different. Better to make it configurable by developer
themselves.
3. Make high amount CPU quota same as other quotas like CPU and
bandwidth. So developer can apply for it if they are running out of
it.

I'm not sure which one is more doable to GAE, but there must be some
solution to be happen otherwise it will not scale.

On Sep 21, 7:27 pm, mitnickcbc [EMAIL PROTECTED] wrote:
 I have filed a feature request for this issue, if you feel so please
 star it.

 http://code.google.com/p/googleappengine/issues/detail?id=720

 Here is the description:

 Well, I don't get the purpose for having a High Amount CPU Quota since
 there is already a general CPU Quota. And there are quite a lot of
 problems caused by this quota which restrict my application from
 affording more load. And my application is far away from a 5 million
 month PV app.
 1. Requests can become a high amount CPU one very easily. A little
 complex request will consume more than 3K mcycles. And what do I mean
 a little
 complex? If you do more than 2 put, or you do a url fetch, or you do a
 query based on an order to select more than 50 model, or you do a put
 on a
 model more than 20 fields, it is that complex. In my case, 80% of the
 requests are that complex and I don't think it can be optimized
 anymore
 since I do need to do put and url fetch.
 2. Bad visibility to this quota. There is no way we can know when we
 will run out of quota for this. All we got is the warning in admin
 console that
 says our requests are using high amount CPU quota and will soon run
 out of it.
 3. Doesn't back to normal quickly. I'm using a script to continue
 fetching my data from production and do some offline process.
 Unfortunately I fetch
 too much in one call that I try to get 100 models at a time and which
 makes the request a high CPU one. Soon, I meet quota deny. Then I stop
 my script,
 but after 1.5 hours, I still see quota deny for requests from my
 users. The Many of the requests to your application are taking a very
 long time.
 Please optimize these requests. warning keeps there even I have
 stopped the script for so long time.
--~--~-~--~~~---~--~~
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: templates - offline yes, online no

2008-09-25 Thread Wooble

Nothing in your python scripts, including the template engine, can
access anything in a static directory or declared as a static file in
app.yaml.  The static files are not copied to the same server as your
python scripts so it doesn't matter how you try to reference them;
they're *only* available at their static URLs over the web.

I believe there's an issue filed requesting that the dev server show
the same behavior, but that seems tricky since the scripts execute
directly from your source directory and hacking the python interpreter
to make stuff in the filesystem invisible to the scripts sounds a bit
ugly.

On Sep 25, 11:10 am, acm [EMAIL PROTECTED] wrote:
 Hi readers,

 I am having a probleme with my templates and the place they stay in.
 Locally (dev_appserver) it works without any problems, but after I
 uploaded my project to appengine (appcfg update) and 
 visitinghttp://goroutes.appspot.comthe exception TemplateDoesNotExist:
 Home.de.html is raised.

 My templates reside in /style/templates/* (relative path). Within
 app.yaml /style is declared as static_dir, but I think that should
 not matter, because the template engine (especially the
 google.appengine.ext.template.render function) works on system level,
 not on urls. I feet the render function with an absolute path, which
 is generated while a request happen. I also tried it with an relative
 path with no luck. I am sure that the template exists, 
 becausehttp://goroutes.appspot.com/style/templates/index.htmlis available. I
 read that in static_dir's no scripts are allowed, but if I move /
 style/templates to /templates and declare /templates as
 static_dir it works, online and offline.

 ... and I do not really want to have templates under the projects root
 folder.

 So, are there any hints, sugesstions or solutions?

 Regards,

 acm.
--~--~-~--~~~---~--~~
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: Facebook DownloadError

2008-09-25 Thread Marzia Niccolai
Hi,

The DownloadError: ApplicationError: 3 (not the most descriptive message, I
acknowledge), indicates that the remote server took too long to respond to
the request.  Currently HTTP requests are allotted about 5 seconds to return
the request before receiving an error.

In this case you can catch the error and allow the user to send the request
again, or change the query so that the remote server will take less time to
respond.

-Marzia

On Thu, Sep 25, 2008 at 8:02 AM, Adam Loving [EMAIL PROTECTED] wrote:


 I'm also seeing

 DownloadError: ApplicationError: 3

 intermittently when using urlfetch to call the Facebook API.

 On Aug 27, 7:44 pm, llad [EMAIL PROTECTED] wrote:
  I am also having this issue with urlfetch.  It works 100% of the time
  in dev but can't get it to work at all in prod.  I'm
 gettingApplicationError: 2, when trying to fetchhttp://
 twitter.com/statuses/public_timeline.rss.
 
  File /base/data/home/apps/oddsurd/1.21/views.py, line 95, in
  _get_something
  feed_rss = urlfetch.Fetch(feed)
File /base/python_lib/versions/1/google/appengine/api/urlfetch.py,
  line 219, in fetch
  raiseDownloadError(str(e))DownloadError:ApplicationError: 2
 
  On Aug 12, 11:27 pm, jeremysomething [EMAIL PROTECTED]
  wrote:
 
   Hi!
 
   I'm having a bit of trouble. I'm creating a facebook app that
   integrates with my google app engine project, and I'm having a hard
   time communicating with the facebook servers.
 
   It works from my dev instance (localhost), but once deployed, I'm
   getting some errors. This actually used to work once deployed as well,
   but the past day, I've been getting this error:
 
   Does anyone know whatDownloadError:ApplicationError:3means?
 
   full trace:
 
   Traceback (most recent call last):
 File /base/python_lib/versions/1/google/appengine/ext/webapp/
   __init__.py, line 501, in __call__
   handler.post(*groups)
 File /base/data/home/apps/w-w-w/1.150/main.py, line 642, in post
   self.updateFacebookProfile(newpost)
 File /base/data/home/apps/w-w-w/1.150/main.py, line 223, in
   updateFacebookProfile
   facebookIdentity.facebookUID)
 File string, line 9, in setFBML
 File /base/data/home/apps/w-w-w/1.150/facebook.py, line 378, in
   __call__
   return self._client('%s.%s' % (self._name, method), args)
 File /base/data/home/apps/w-w-w/1.150/facebook.py, line 783, in
   __call__
   result = urlfetch.fetch(FACEBOOK_URL, payload=post_data,
   method=urlfetch.POST, headers=headers)
 File /base/python_lib/versions/1/google/appengine/api/urlfetch.py,
   line 216, in fetch
   raiseDownloadError(str(e))
  DownloadError:ApplicationError:3
 
   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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: templates - offline yes, online no

2008-09-25 Thread Alexander Meinke
Wooble wrote:
 The static files are not copied to the same server as your
 python scripts so it doesn't matter how you try to reference them;
 they're *only* available at their static URLs over the web.

So it is impossible having templates in a static_[dir|files], because the
template engine works on system level, whereas static files are only accessible
via url.

 ... and I do not really want to have templates under the projects root
 folder.

Is is inescapeable. - Agent Smith ;)

Thank you Wooble.



signature.asc
Description: OpenPGP digital signature


[google-appengine] Please Help me, Server Not Found, 404

2008-09-25 Thread aonlazio

Hi,
 I signed my domain name through Google (via Godaddy indeed) . I
just add www.mydomain.com into Google App ID. And add the host name
into A record in DNS settings like this
mydomain.com216.239.32.21
mydomain.com216.239.34.21
mydomain.com216.239.36.21
mydomain.com216.239.38.21.

according to this site
http://aralbalkan.com/category/google-app-engine

But somehow I experiencing Server Not Found Error 404. I am sure the
app engine works fine but
What's wrong?

Thanks in advance.

Aonlazio
--~--~-~--~~~---~--~~
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: urlfetch User-agent not recognized by Yahoo shopping API

2008-09-25 Thread Marzia Niccolai
Hi Adam,

Currently, App Engine does not allow applications to add or modify the user
agent header, so I'm not sure there is something that can be from your
application that will allow Yahoo! to accept the requests.

Your best bet is to contact Yahoo! when the re-enable posting to see if they
can add the appropriate User Agent to their whitelist.

Thanks,
Marzia

On Thu, Sep 25, 2008 at 10:20 AM, Adam Loving [EMAIL PROTECTED] wrote:


 I realize this is an issue for Yahoo Shopping, not Google, but posting
 is disabled over at the Yahoo Shopping discussion board, and I have to
 post it somewhere :).

 When I call the Yahoo Shopping API using urlfetch from my app engine
 app, I always receive a User-agent not valid return code. I am
 guessing Yahoo just doesn't recognize the Google header yet, and have
 not found a work-around.

 Response: ?xml version=1.0 encoding=utf-8?
 Error xmlns=urn:yahoo:api xmlns:xsi=http://www.w3.org/2001/
 XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance
 xsi:schemaLocation=urn:yahoo:api
 http://api.yahoo.com/Api/V1/error.xsd;
 The following errors were detected:
 MessageUser-agent not valid/Message
 /Error
 


--~--~-~--~~~---~--~~
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: Can User API perform single sign in for other Google web services?

2008-09-25 Thread Jeff S

The App Engine users API is separate from the authorization system
required by Google Data APIs (like picasaweb). A user will need to
authorize your app to access their picasaweb data, so I recommend
using AuthSub. It is still a good idea to have users log in to your
app, because you can then store the long lived AuthSub session token
in the datastore and associate it with the current user. By reusing
the session token, users will not have to go through multiple
redirects to authorize your app each time that you app accesses
picasaweb, the user will just need to do the redirects the first time
they use your app.

Happy coding,

Jeff

On Sep 24, 5:49 am, Yu-Chao Chang [EMAIL PROTECTED] wrote:
 I am working on a project on app engine which could let users upload
 photo through the web page in my appspot to their photo album on
 picasaweb. In my understanding, I could user User API to handle the
 authentication on app engine. However, I can't find a way to extract
 or obtain the identity from User API such like user's token or cookie
 in order to query picasaweb. It seems I need to use another API called
 AuthSub and it makes users to do a double login situation.

 Perhapes I need to abandon User API and switch to AuthSub purely?
--~--~-~--~~~---~--~~
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] Per Session Datastore

2008-09-25 Thread [EMAIL PROTECTED]

First post related to my first ever app, so watch out.

I've had a lot of fun making this:

http://chroma-some.appspot.com/

And I've gotten a fair volume of usage which has encouraged me to keep
polishing it. One issue I was having was attempting to store too many
data structures (big dictionary of color terms, session-related
dictionaries, etc) in memory in the Main(). I was getting errors as a
result.

I memcached the big dictionary of color terms -- I want that shared
across users -- and that seems to work fine. Searches are reasonably
fast.

I also created a datastore with the intention of storing the user's
per-session saves (permanent gallery sort-of-a-thing will come later).
This flushes into another permanent datastore at the start of each
session (so I can track what colors are popular across time and
region). This perm datastore works fine as well.

But now I'm experiencing concurrency issues with what I intended to be
a per-session datastore -- I can see other users session saves. They
can see mine. I delete theirs, creating errors when they try to re-
access, etc. Your classic concurrency crises!

I could use some help -- broad stroke steps to take -- to sort of
quickly implement a solution. Obviously, I need a user ID by which to
filter the session saves, but what's the best practice there? How to
create it? Where to store it (as a cookie)?

Later I plan to make use of the Google User functionality, but at this
stage I'd just to get the per-session datastore working w/o
concurrency problems.

Thanks in advance for any help!

Jason

--~--~-~--~~~---~--~~
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: How to specify a key_name parameter when bulk uploading?

2008-09-25 Thread James Little

Found a solution here: 
http://groups.google.com/group/google-appengine/browse_thread/thread/a0b8480f797bcd4e?pli=1

uses a HandleEntity override.

On Sep 25, 5:22 pm, James Little [EMAIL PROTECTED] wrote:
 I'm also interested in knowing how to do this; any ideas??

 On Sep 8, 2:05 am, Peter Recore [EMAIL PROTECTED] wrote:

  I have read the bulk loader article, skimmed the bulkloader python
  source, searched this group, and experimented but I still can't figure
  out how to specify a key_name parameter when using the bulk loader.
  Please tell me what I'm missing, even if it's something obvious that
  will make me feel dumb, as it seems that specifying a key name would
  be very useful when bulk loading many types of data.
--~--~-~--~~~---~--~~
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: BadRequestError: Salary search with over 500K records

2008-09-25 Thread Tony Arkles

You definitely can not.

From http://code.google.com/appengine/docs/datastore/keysandentitygroups.html:

An application should not rely on numeric IDs being assigned in
increasing order with the order of entity creation. This is generally
the case, but not guaranteed.

On Sep 25, 10:41 am, Venkatesh Rangarajan
[EMAIL PROTECTED] wrote:
 Exactly my thought... One cannot assume that the keys are in ascending order
 or Can we ?

 On Thu, Sep 25, 2008 at 7:42 AM, Tony Arkles [EMAIL PROTECTED] wrote:

  Thomas, I think that solution will only work if the items are being
  returned such that their keys will be in ascending order (which in the
  general case seems like a very poor assumption).

  Did I miss something?

  On Sep 25, 1:14 am, Thomas Johansson [EMAIL PROTECTED] wrote:
   Entities always have a key, available as entity.key(). In addition to
   that, you can set a friendly key at construction only (can't be
   changed or set later), using key_name. If you do not however set a
   key_name, app engine will assign a numeric id, available as
   entity.key().id().

   In other words, change your pagination to something like: items =
   Item.filter('key ', request.get('start')).fetch(1000), and pass the
   key of the last item as the start parameter.

   On Sep 25, 6:45 am, Venkatesh Rangarajan

   [EMAIL PROTECTED] wrote:
Folks,

I have created a salary search application (
 http://payrate.appspot.com)

I have uploaded around 500K records without an ID Field ( yeah,my Bad).

Now i am running into BadRequestError: offset may not be above 1000
  error
when the results exceed 1000 and user is on the last page. I display
  100
records per page.

Sample :http://payrate.appspot.com/?keyword=Engineerpage=800

Any ideas on how I can update all the records with Index ? I know I
  could do
that using page refreshes, but looking for some elegant solution.

Rgds,
Venkatesh


--~--~-~--~~~---~--~~
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: Automatically adding a static index.html to a URL with app.yaml

2008-09-25 Thread SIE

Marzia,

Thanks for your reply.

I cut and pasted your handlers into my app.yaml file, but the error
persists, and it may be a fundamental problem.

If the main directory contains a subdirectory dir with two files

index.html
styles.css

with index.html including styles.css, then with the handlers

- url: /dir/index.html
  static_files: dir/index.html
  upload: dir/index.html

- url: /dir/styles.css
  static_files: dir/styles.css
  upload: dir/styles.css

- url: /dir/
  static_files: dir/index.html
  upload: dir/index.html

a call to

http://localhost:8080/dir/

works as it should

INFO 2008-09-25 20:36:28,761 dev_appserver.py] GET /dir/ HTTP/
1.1 200 -
INFO 2008-09-25 20:36:28,934 dev_appserver.py] GET /dir/
styles.css HTTP/1.1 200 -

However, if we substitute for the last handler

- url: /dir
  static_files: dir/index.html
  upload: dir/index.html

then a call to

http://localhost:8080/dir

yields the error

INFO 2008-09-25 20:39:07,117 dev_appserver.py] GET /dir HTTP/1.1
200 -
INFO 2008-09-25 20:39:07,272 dev_appserver.py] GET /styles.css
HTTP/1.1 404 -

I've reorganized my files to avoid this problem, but you may wish to
forward it along to the appropriate place.

Again, many thanks for your replies.


On Sep 24, 3:56 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Rather, I made a typo, this works for me:

 - url: /(.*\.(html|css))
   static_files: \1
   upload: dir/.*\.(html|css)

 - url: /dir(.*)
   static_files: dir/index.html
   upload: dir/index.html

 For the first handler, you have to upload the static files from the
 directory.

 -Marzia

--~--~-~--~~~---~--~~
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: Automatically adding a static index.html to a URL with app.yaml

2008-09-25 Thread Wooble



On Sep 25, 4:46 pm, SIE [EMAIL PROTECTED] wrote:
 However, if we substitute for the last handler

 - url: /dir
   static_files: dir/index.html
   upload: dir/index.html

 then a call to

 http://localhost:8080/dir

 yields the error

 INFO     2008-09-25 20:39:07,117 dev_appserver.py] GET /dir HTTP/1.1
 200 -
 INFO     2008-09-25 20:39:07,272 dev_appserver.py] GET /styles.css
 HTTP/1.1 404 -

This isn't a problem with App Engine, that's (expected) behavior by
the web browser caused by a relative URL.

The solution is to refer to /dir/styles.css in your HTML instead of
styles.css.
--~--~-~--~~~---~--~~
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: Automatically adding a static index.html to a URL with app.yaml

2008-09-25 Thread SIE


Wooble,

Your solution of using an absolute URL instead of a relative one
worked.

Many thanks!


On Sep 25, 3:51 pm, Wooble [EMAIL PROTECTED] wrote:

 This isn't a problem with App Engine, that's (expected) behavior by
 the web browser caused by a relative URL.

 The solution is to refer to /dir/styles.css in your HTML instead of
 styles.css.
--~--~-~--~~~---~--~~
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] Who would post a detailed app with testcases powered by gaeunit?

2008-09-25 Thread GAEFans

For example, some testcases for '%google_appengine_home%\demos
\guestbook'.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Please Help me, Server Not Found, 404

2008-09-25 Thread Sekhar

You need to set up an alias for www pointing to ghs.google.com. See
http://www.google.com/support/a/bin/answer.py?hl=enanswer=47283 for
detailed instructions - the page also has walk-throughs for many
providers.

On Sep 25, 10:58 am, aonlazio [EMAIL PROTECTED] wrote:
 Hi,
      I signed my domain name through Google (via Godaddy indeed) . I
 just addwww.mydomain.cominto Google App ID. And add the host name
 into A record in DNS settings like this
 mydomain.com    216.239.32.21
 mydomain.com    216.239.34.21
 mydomain.com    216.239.36.21
 mydomain.com    216.239.38.21.

 according to this sitehttp://aralbalkan.com/category/google-app-engine

 But somehow I experiencing Server Not Found Error 404. I am sure the
 app engine works fine but
 What's wrong?

 Thanks in advance.

 Aonlazio
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---