[google-appengine] Re: 502 server error appears google appengine? Why

2009-02-16 Thread app engine dude

i came across the same problem with my app.try correcting your
app.yaml file.and name it correctly.also main file'/' should be named
correctly.the main reason is your app.yaml might be broken.

On Feb 17, 10:53 am, frank Shi  wrote:
> Screenshothttp://picasaweb.google.com/frankshiapp/EcOuqF?authkey=UrB5Bqpe5l4#53...
--~--~-~--~~~---~--~~
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: New Limits for Several App Engine Operations

2009-02-16 Thread cz

It would indeed be great to have some kind of way to store big binary
blobs such as images etc. that are larger than 1mb without having to
resort to using a third party storage solution like Amazon's S3. I'm
under the impression though that Google is working on this (see
roadmap).

On Feb 16, 9:36 pm, Will  wrote:
> To me, keeping 1MB datastore entity limit while allowing 10MB
> request/response doesn't make much sense. It is more useful to make the
> limits in sync/compatible.
>
> Regards,
>
> Will
>
> On Mon, Feb 16, 2009 at 10:21 PM, frank Shi  wrote:
>
> > Because of these limits , leading to the implementation of my program
> > sometimes unsuccessful.
> >http://www.delicioustools.com
>
> > On 2月14日, 上午6时13分, "Marce (Google)"  wrote:
> > > For those of you who haven't already heard, we're very excited
> > > yesterday to have announced that we've raised limits on several App
> > > Engine operations:
>
> > > * No more "High CPU Requests"! App Engine Apps were once allowed
> > > no more than 2 CPU-intensive requests per minute. We've made some
> > > adjustments to the way we handle requests, and have eliminated this
> > > limitation altogether. To learn more about how this works and the
> > > implications for your app, see our documentation.
> > > * Response deadline raised to 30 seconds. The amount of time an
> > > App Engine app can take to respond to an incoming request has been
> > > raised from 10 to 30 seconds! There are limits on the number of
> > > simultaneous active requests an application can process at any given
> > > moment--see our docs to learn more.
> > > * Size limits on code files, static files, and requests/responses
> > > raised to 10MB! App Engine apps can now receive requests and send
> > > responses of up to 10MB in size, and users can upload 10MB code and
> > > static files as well. Note that API requests (e.g. memcache.set(),
> > > db.put()) are still limited to 1MB in size.
>
> > > These changes were inspired and driven by a great deal of developer
> > > feedback, and we're not done! Please let us know what you'd like to
> > > see next on App Engine .
>
>
--~--~-~--~~~---~--~~
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: spell checker

2009-02-16 Thread diomedes

> > Trying to do this server-side is going to be very difficult - you'd
> > have to store a massive dictionary on GAE, and a datastore get for
> > every single word.
You would probably be better off using a library that provides the
dictionary through some form of static files that you can import as
part of your app. Given the current deployment limits (10MB per file,
150MB total) that route is feasible.

As for specific library suggestions, I don't think I can add much.
>From a quick google search the libs that appear relevant seem to have
dependencies on C libraries/Unix external programs (http://
www.johndcook.com/blog/2008/11/29/spell-checking-from-python/  )

diomedes

On Feb 16, 9:20 pm, app engine dude  wrote:
> thanx for the reply.Is there any library or so so that i can add it to
> the python library in app engine. I just need to display wrong or
> right but not compare for the spelling
>
> On Feb 17, 9:51 am, Greg  wrote:
>
> > Persuade your users to switch to Firefox - it does just what you want
> > for all text inputs and textareas, no matter what site you are on.
> > Trying to do this server-side is going to be very difficult - you'd
> > have to store a massive dictionary on GAE, and a datastore get for
> > every single word.
>
> > On Feb 17, 12:16 am, app engine dude  wrote:
>
> > > I an developing a simple website on app engine. I have some html pages
> > > designed and that pages consists of text boxes and text areas for
> > > entering text. I need help regarding the entry, where a red line or
> > > green line should be displayed in case of incorrect entry as in case
> > > of editor.
--~--~-~--~~~---~--~~
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] 502 server error appears google appengine? Why

2009-02-16 Thread frank Shi

Screenshot
http://picasaweb.google.com/frankshiapp/EcOuqF?authkey=UrB5Bqpe5l4#5303639148475182258
--~--~-~--~~~---~--~~
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: New Limits for Several App Engine Operations

2009-02-16 Thread Will
To me, keeping 1MB datastore entity limit while allowing 10MB
request/response doesn't make much sense. It is more useful to make the
limits in sync/compatible.

Regards,

Will

On Mon, Feb 16, 2009 at 10:21 PM, frank Shi  wrote:

>
>
> Because of these limits , leading to the implementation of my program
> sometimes unsuccessful.
> http://www.delicioustools.com
>
> On 2月14日, 上午6时13分, "Marce (Google)"  wrote:
> > For those of you who haven't already heard, we're very excited
> > yesterday to have announced that we've raised limits on several App
> > Engine operations:
> >
> > * No more "High CPU Requests"! App Engine Apps were once allowed
> > no more than 2 CPU-intensive requests per minute. We've made some
> > adjustments to the way we handle requests, and have eliminated this
> > limitation altogether. To learn more about how this works and the
> > implications for your app, see our documentation.
> > * Response deadline raised to 30 seconds. The amount of time an
> > App Engine app can take to respond to an incoming request has been
> > raised from 10 to 30 seconds! There are limits on the number of
> > simultaneous active requests an application can process at any given
> > moment--see our docs to learn more.
> > * Size limits on code files, static files, and requests/responses
> > raised to 10MB! App Engine apps can now receive requests and send
> > responses of up to 10MB in size, and users can upload 10MB code and
> > static files as well. Note that API requests (e.g. memcache.set(),
> > db.put()) are still limited to 1MB in size.
> >
> > These changes were inspired and driven by a great deal of developer
> > feedback, and we're not done! Please let us know what you'd like to
> > see next on App Engine .
>
> >
>

--~--~-~--~~~---~--~~
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: Requests going twice

2009-02-16 Thread diomedes

Looking at your log it seems that browser is requesting the /init when
it processes the html ,

I would look inside the html template for a misplaced href="/init"
inside an image tag or sth similar.

diomedes


On Feb 16, 8:25 pm, NiceGuy  wrote:
> I am having a strange problem,
>
> I have the following python script written in init.py
>
> import os
> from google.appengine.ext.webapp import template
> import cgi
> import wsgiref.handlers
>
> from google.appengine.api import users
> from google.appengine.ext import webapp
> from google.appengine.ext import db
> from google.appengine.api import mail
>
> class htmlFile(db.Model):
>   ua = db.StringProperty(multiline=False)
>   fn = db.StringProperty(multiline=False)
>   nm = db.IntegerProperty()
>   dt = db.DateTimeProperty(auto_now=True)
>
> class Init(webapp.RequestHandler):
>   def get(self):
>
> fns = ['AAA','BBB','CCC']
>
> for c in fns:
>   ht = htmlFile()
>   ht.ua = ""
>   ht.fn = c
>   ht.nm = 0
>   ht.put()
>
> path = os.path.join(os.path.dirname(__file__)+'/html/',
> 'index.html')
> self.response.out.write(template.render(path, { }))
>
> def main():
>   application = webapp.WSGIApplication([('/*.*', Init)],debug=True)
>   wsgiref.handlers.CGIHandler().run(application)
>
> if __name__ == "__main__":
>   main()
>
> My app.yaml has the following line
>
> - url: /init.*
>   script: init.py
>
> THe problem is that from the browser i type localhost:8080/init and
> the script gets executed twice which can be seen clearly from the
> terminal output
>
> INFO 2009-02-17 04:15:00,090 dev_appserver.py] "GET /init HTTP/
> 1.1" 200 -
> INFO 2009-02-17 04:15:00,107 dev_appserver_index.py] Updating /
> home/awin/SRC/bt-labs/appengine/bttest/index.yaml
> INFO 2009-02-17 04:15:00,138 dev_appserver.py] "GET /acrane.gif
> HTTP/1.1" 200 -
> INFO 2009-02-17 04:15:00,148 dev_appserver.py] "GET /jquery-
> latest.js HTTP/1.1" 200 -
> INFO 2009-02-17 04:15:00,166 dev_appserver.py] "GET /offdiag.gif
> HTTP/1.1" 200 -
> INFO 2009-02-17 04:15:00,175 dev_appserver.py] "GET /maindiag.gif
> HTTP/1.1" 200 -
> INFO 2009-02-17 04:15:00,198 dev_appserver.py] "GET /init HTTP/
> 1.1" 200 -
> INFO 2009-02-17 04:15:00,255 dev_appserver.py] "GET /blog2.jpg
> HTTP/1.1" 200 -
> INFO 2009-02-17 04:15:00,270 dev_appserver.py] "GET /
> bulletpoint.gif HTTP/1.1" 200 -
>
> So the datastore which is was supposed to have 3 entries is getting
> six entries.
>
> I find this happening with soem of my other scripts also.
>
> I didnot go my app online due to this error.
>
> Earlier i thought it is a browser problem so i switched from Firefox
> to Galen but again the smae thing happens...
>
> Please help me
--~--~-~--~~~---~--~~
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: spell checker

2009-02-16 Thread app engine dude

thanx for the reply.Is there any library or so so that i can add it to
the python library in app engine. I just need to display wrong or
right but not compare for the spelling

On Feb 17, 9:51 am, Greg  wrote:
> Persuade your users to switch to Firefox - it does just what you want
> for all text inputs and textareas, no matter what site you are on.
> Trying to do this server-side is going to be very difficult - you'd
> have to store a massive dictionary on GAE, and a datastore get for
> every single word.
>
> On Feb 17, 12:16 am, app engine dude  wrote:
>
> > I an developing a simple website on app engine. I have some html pages
> > designed and that pages consists of text boxes and text areas for
> > entering text. I need help regarding the entry, where a red line or
> > green line should be displayed in case of incorrect entry as in case
> > of editor.
>
>
--~--~-~--~~~---~--~~
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: CPU accounting for Datastore writes and pricing feedback

2009-02-16 Thread diomedes

Ok,

(a bit bummed that nobody bother to reply to my first post to the
group)
I spent the last few days reading related posts, transcripts of chats
with Marzia, went through the related tickets and still I have no
answer.

Let me try once more to explain my question:
It is not about quotas.
It is neither about performance per se.
My question is about cost.
My app implements a beacon service - my client websites that will be
using the beacon have 5-10M pageviews per month and these pageviews
will result into actual beacon hits to my app.
These requests do not hit the Datastore - I buffer them in memcached
doing minimal processing to keep the per beacon-hit cost low and
"process them" in batches every few seconds.

Still, in spite of all the buffering, if the cheapest write (1 attr
table, no indexes) gets charged 250-500msec, this make the app design
for such a high throughput service non-obvious.

I understand that I can decrease the number of my writes by using a
pickled blob attr that contains lots of records inside - that what I
am about to do.
I just wanted a confirmation from any gurus out there, or from the
google team that my understanding about the cost of the "cheapest
write" is correct.

I tried batch db.put( of 100 single cell objects) - still took 23
seconds of data store CPU , i.e. my cheapest write = 230msec - a bit
less than before but not by much.
I made all 100 objects children of same parent and performed the same
test - again same datastore CPU utilization

Is there another method to update/insert multiple records that costs
less? I.e. is there any cheaper write? ( I am very flexible :-) )
Is my understanding that the planned 10-12cents per CPU hr will be
applied towards the datastore CPU usage as well?

Thanks a lot,

diomedes


On Feb 14, 3:18 pm, diomedes  wrote:
> Hi all,
>
> I have a question with regards to the pricing and how it relates to
> the relatively high API CPU associated with each write (400-500msec)
>
> I have started working on my first GAE app about a month ago - and
> overall I am both excited and very satisfied.  My initial plan, was to
> run it on Amazon's EC2 - but eventually I took the plunge, started
> learning python, move to GAE and (almost) never looked back :-)
>
> My app, a cacti-like webservice that monitors the performance ( think
> response time) of a website using google analytics-like beacons, is
> rather resource demanding.  On top of that GAE best practices imply
> that any expensive reports/aggregates etc should be precalculated/
> stored instead of dynamically produced on demand.  All that result in
> many writes and given that the simplest write (single key-val pair, no
> indexes) gets "charged" approx 500msec of API cpu time (see related
> thread by 
> Matijahttp://groups.google.com/group/google-appengine/browse_thread/thread/...)
> a normal DB design that would have been meaningful in terms of cost on
> EC2 becomes impossible on GAE.
>
> Because I am a google-aholic I decided to change the app design to
> minimize writes - I fetch a bunch of pickled data as a blob,  update
> in mem and write them back as blob (just like people did before DBs
> came along :-) )
> Before I commit to that design I wanted to get the confirmation that
> my understanding is correct:
> - Google is going to charge 10-12cents per CPU-hour and it will
> include in that all the CPU used from APIs etc. (http://
> googleappengine.blogspot.com/2008/05/announcing-open-signups-
> expected.html)
> - This means that if your site does 10M pageviews a month and does
> a couple writes per pageview at 500msec per write it will be  "10M CPU
> secs/mo just from the writes, i.e. 10M/3600 * $.10/hr = $280/mo just
> from the writes.
>
> Is this correct?
>
> For the record, I find Google's planned pricing extremely attractive
> when compared to Amazon's primarily due to the fact that Amazon
> charges 10c for CPU-hr of the machine while google (will) charge 10c
> for CPU-hr *actually used* by your requests.  This makes a huge
> difference -- a server running at 50+% capacity (thats rather
> aggressive - but with Amazon/RightScale combination you can be
> aggressive) will still use less than 20% of its CPU during that time.
> However, when comparing the cost writes  between Google and the
> corresponding setup of a [high CPU EC2 server + elastic storage] combo
> (able to provide quite more than  20-50 "simple" writes per sec)
> Amazon is much cheaper than Google.
>
> Ok, that's all I had to say,
> Sorry for the rather long post,
> Looking forward to hear comments
>
> Ah and thank you very very much for lifting the high cpu quota!!
>
> Diomedes
--~--~-~--~~~---~--~~
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 thi

[google-appengine] Re: SDK under Linux Bug ?

2009-02-16 Thread Greg

Just confirming that SDK 1.1.9 works fine on Linux for me.
--~--~-~--~~~---~--~~
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: spell checker

2009-02-16 Thread Greg

Persuade your users to switch to Firefox - it does just what you want
for all text inputs and textareas, no matter what site you are on.
Trying to do this server-side is going to be very difficult - you'd
have to store a massive dictionary on GAE, and a datastore get for
every single word.

On Feb 17, 12:16 am, app engine dude  wrote:
> I an developing a simple website on app engine. I have some html pages
> designed and that pages consists of text boxes and text areas for
> entering text. I need help regarding the entry, where a red line or
> green line should be displayed in case of incorrect entry as in case
> of editor.
--~--~-~--~~~---~--~~
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: difference between GAE and regular web hosting

2009-02-16 Thread Greg

You have to trade off flexibility (GAE doesn't let you run an RDBMS,
or cron jobs, and there are several other limitations) for scalability/
redundancy.

For me, not having to worry about what happens if my app hits the big
time, or the particular server it is on catches fire, or if I set up
the iptables firewall slightly wrong easily outweighs the extra
development I need to do to fit GAE's API. For you... who knows?
--~--~-~--~~~---~--~~
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] Requests going twice

2009-02-16 Thread NiceGuy

I am having a strange problem,

I have the following python script written in init.py

import os
from google.appengine.ext.webapp import template
import cgi
import wsgiref.handlers

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext import db
from google.appengine.api import mail

class htmlFile(db.Model):
  ua = db.StringProperty(multiline=False)
  fn = db.StringProperty(multiline=False)
  nm = db.IntegerProperty()
  dt = db.DateTimeProperty(auto_now=True)

class Init(webapp.RequestHandler):
  def get(self):

fns = ['AAA','BBB','CCC']

for c in fns:
  ht = htmlFile()
  ht.ua = ""
  ht.fn = c
  ht.nm = 0
  ht.put()

path = os.path.join(os.path.dirname(__file__)+'/html/',
'index.html')
self.response.out.write(template.render(path, { }))

def main():
  application = webapp.WSGIApplication([('/*.*', Init)],debug=True)
  wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
  main()


My app.yaml has the following line

- url: /init.*
  script: init.py


THe problem is that from the browser i type localhost:8080/init and
the script gets executed twice which can be seen clearly from the
terminal output

INFO 2009-02-17 04:15:00,090 dev_appserver.py] "GET /init HTTP/
1.1" 200 -
INFO 2009-02-17 04:15:00,107 dev_appserver_index.py] Updating /
home/awin/SRC/bt-labs/appengine/bttest/index.yaml
INFO 2009-02-17 04:15:00,138 dev_appserver.py] "GET /acrane.gif
HTTP/1.1" 200 -
INFO 2009-02-17 04:15:00,148 dev_appserver.py] "GET /jquery-
latest.js HTTP/1.1" 200 -
INFO 2009-02-17 04:15:00,166 dev_appserver.py] "GET /offdiag.gif
HTTP/1.1" 200 -
INFO 2009-02-17 04:15:00,175 dev_appserver.py] "GET /maindiag.gif
HTTP/1.1" 200 -
INFO 2009-02-17 04:15:00,198 dev_appserver.py] "GET /init HTTP/
1.1" 200 -
INFO 2009-02-17 04:15:00,255 dev_appserver.py] "GET /blog2.jpg
HTTP/1.1" 200 -
INFO 2009-02-17 04:15:00,270 dev_appserver.py] "GET /
bulletpoint.gif HTTP/1.1" 200 -

So the datastore which is was supposed to have 3 entries is getting
six entries.

I find this happening with soem of my other scripts also.

I didnot go my app online due to this error.

Earlier i thought it is a browser problem so i switched from Firefox
to Galen but again the smae thing happens...

Please help me
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: HELP~~~~~!!! How to run the Google App in my local LAN

2009-02-16 Thread Allen

Hi Bryan,

the application can be hosted in LAN just use dev_appserver.py.
but I can user my own user registration and authentication.

It seems that "app-engine-patch" can fix this for google app engine.
But I don't know jack about Django web framework, I began to learn
Python from Google App Engine.

Do you have any suggestions for me?
Appreciate!


On 2月15日, 上午5时46分, Bryan Donlan  wrote:
> On Feb 14, 2:55 pm, Nash-t  wrote:
>
> > I'd like to do this too but keep in mind you need to build your own
> > authentication and security system.
>
> > Has anyone done any load/stress testing on the dev server? Or taken a
> > close look at it's architecture? Is there a possibility to create a
> > open source version of app engine that we could use for intranets?
>
> > The reason I am interested in this is simple. A significant percentage
> > of my target market doesn't want their data in the cloud. If we can
> > write one application that can serve cloud as well as intranet users,
> > we will promote cloud adoption in an evolutionary way.
>
> The dev appserver does all queries with linear searches, and has no
> logging or other such protections for data integrity. It is most
> certainly NOT something you want to use for production use.
>
> Of course, anyone is free to fix it up and make it ready for
> production use :)
--~--~-~--~~~---~--~~
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] Intercepting Model Creation

2009-02-16 Thread RobertG

Short version:
I want to execute code during creation of a Model subclass but I need
to know whether or not the object is saved in the datastore and/or
execute datastore queries. Since Model.is_saved() never returns True
inside __init__(), overriding this method doesn't work. I also tried
intercepting construction with a metaclass, and numerous other
approaches, but nothing I've tried works. From examining the source
code it appears that the Model objects aren't fully constructed until
after get() returns, but there doesn't seem to be a convenient,
documented location to put my intercept code.

My specific situation is that I want to replace a ReferenceProperty
with a value I have stored in a cache to avoid a trip to the
datastore.

Here's an example:
class A(db.Model):
  str = db.StringProperty()

class B(db.Model):
  a = db.ReferenceProperty(A)

I want the following code to succeed (assuming B is stored in
datastore):
a = from_cache(a_key)
b = B.get(key)
assert a == b.a

I can populate B.a with the proper value using something like the
following in B:
def Load(self):
  a_key = B.a.get_value_for_datastore(self)
  self.a = from_cache(a_key)

But I can't figure out where to put the call to Load().

Long version:
The reason I'm trying to do this is for performance. I have some very
long-lived objects that use ReferenceProperty to manage relationships
between them, plus a large number of frequently-created objects that
use ReferenceProperty to refer to the long-lived objects. After many
DeadlineExceededErrors I started using memcache to store the long-
lived objects. That helped but not enough. Profiling showed that most
of my time was now being spent in memcache, apparently because
memcache goes to the network on every get() call. So I introduced an
in-memory cache in front of memcache and now first search in-memory,
then in memcache, then go to the datastore.

That helped a lot and I'm now avoiding the DeadlineExceededErrors but
many of my pages still take many seconds to load. Further profiling
pointed out that the ReferenceProperty attributes (primarily in my
frequently-created objects that refer to my long-lived objects) are
hitting the datastore and causing most of my performance problems.
That's the problem I'm trying to solve -- I want to be able to load
all those objects and have them use the cached long-lived objects
instead of going to the datastore to get them.

I thought this would be a common problem but I haven't been able to
find anyone else addressing this. Either I'm not looking in the right
place, people haven't addressed this yet, those who have are not
sharing, or my data model is screwed up and doesn't work with the
AppEngine datastore very well!

--~--~-~--~~~---~--~~
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 Geocoding not working

2009-02-16 Thread ehmo

Hey guys,
i'm trying to use Google Geocoding service
http://code.google.com/apis/maps/documentation/geocoding/index.html
via http.
I generated API key for actual domain and it's not working {u'Status':
{u'code': 610, u'request': u'geocode'}, u'name': u'Brno'}.
610 mean it's not good key for this domain. I tryied it on another
hosting with php, it's working. I tryied it on another hosting with
same python lib and it's working too. I tryied to use urlfetch and
urllib2, nothing works.
Any idea?

Maybe it's because of header restrictions, but i really don't know.
That link, which is called is ok, coz if i'll try it in browser,
everything works. All data are encoded before posting, there is 100%
not problem.

Thnx for help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: query over two properties

2009-02-16 Thread djidjadji

GAE queries do not allow AND and OR operators.
For your problem you have to combine the results from 2 queries.
One on the 'to' field and one on the 'from' field.

--~--~-~--~~~---~--~~
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: Versions and datastore consistency (was Re: Deleting a field in datastore)

2009-02-16 Thread Alexander Konovalenko

On Tue, Feb 17, 2009 at 04:25, Sridhar Ratnakumar
 wrote:
>
> A related question - is there a way to have two versions of datastore
> so that I can run 'production' and 'staging' instances of my app? In
> case, if I want to test new features without messing up the production
> datastore, I can use the staging datastore.
>
> If not, what is the appropriate way to do this?

I'm not aware of any simple and general solution, but your options include:

1) Testing on the development server (SDK) only. Check out the
--datastore_path command line option. I think you should be able to
create a copy of a dev datastore by copying the --datastore_path file
(when no dev server is using it), but I haven't tried it.

2) Using a separate app. Each app has its own datastore, inaccessible
to other apps, so you'll have to migrate your data manually between
this staging app and your stable app.

3) Emulating versioned datastore manually. You will still have a
single shared datastore, but you can write your code so that it never
touches other versions' data. Or it can only access some other
version's data under very specific circumstances. Or whatever. How
this is best done heavily depends on what kind of changes you are
trying to introduce to the datastore.

Changes to your datastore schema can be risky. It is always good to
have a full backup and test the restoration procedure periodically.

--~--~-~--~~~---~--~~
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: storing key value pair in datastore

2009-02-16 Thread djidjadji

You can do 2) ListProperty to a custom class.
Each class instance is an object in the datastore and the ListProperty
has db.Key as elements.

If you have URL-description pairs you probably will not select the
object based on the content of the URLs. In that case you can
construct a list of tuples. Each tuple is the URL-desc pair. You store
this list in a BlobProperty by using the pickle module. When you
retrieve the object you unpickle the Blob and put the list in the
template-var dictionary. Or use the simple json module that is part of
django.

--~--~-~--~~~---~--~~
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: Order/Stock Entity Groups Puzzle

2009-02-16 Thread Bryan Donlan



On Feb 15, 6:12 pm, Koen Bok  wrote:
> I'm trying to design a small webstore and running into some issues.
>
> I have an order that has multiple lines. If any of those lines change
> in quantity my stock entity should reflect that, so they should be
> wrapped in a transaction. But as an order can have multiple lines
> (referring to multiple stocks) and can has only one parent that won't
> work.
>
> So I will create two entities for the order:
>
> Order
> OrderLine (parent: stock)
>
> But now I have a problem with the order/orderline group, as they need
> to be transactional too. So I was thinking, get rid of the order
> object and only have orderlines, but that doesn't solve anything
> because the orderlines will not be transactional with other orderlines
> they relate to.
>
> So the only thing I can still think of is making a store entity and
> make it the parent of orders and stocks like this:
>
> Store
> Stock (parent: store)
> Order (parent: store)
>
> But this will give me horrible performance as every stock or order can
> only be updated max 5 times a second (for being in the same entity
> group). Anyone got a better idea?

First off, does your order really need to be in a transaction with
order lines?

If you can't avoid that portion, then you may want to consider a
slightly more complex protocol for stock updates. Consider a new
entity type, a StockReservation.
When you create an orderline, before actually creating it, decide on a
key for it. Use a random number or UUID or something to ensure it
won't collide.
Now, in a transaction:
  * Reduce the available stock.
  * Create a StockReservation, with parent = the Stock entity, an
arbitrary key, containing the amount you reduced the stock by, a copy
of the orderline's key, and the current time stamp.
Then in a seperate transaction:
  * Create your orderline with parent = the Order entity
  * Update your Order entity
Then in a final transaction:
  * Delete the StockReservation

If the orderline update fails before the actual orderline creation,
you could have some stale reservations; so periodically go through any
StockReservations older than a minute or so, and reverse them - that
is:
  * (not in a transaction) Select a StockReservation
  * Check if its OrderLine exists. If so, delete the StockReservation
and stop.
  * Enter a transaction and:
* Verify the StockReservation still exists
* Add its quantity back to the Stock entity
* Delete the Stock Reservation

There's one more failure mode that must be addressed; if the
StockReservation is not deleted, and later the OrderLine is deleted,
you could end up with too much stock. This can be addressed by making
sure that anything that deletes an orderline first searches for a
StockReservation associated with that OrderLine, and deletes it if
found.
--~--~-~--~~~---~--~~
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: Versions and datastore consistency (was Re: Deleting a field in datastore)

2009-02-16 Thread Bryan Donlan



On Feb 16, 5:25 pm, Sridhar Ratnakumar 
wrote:
> On Mon, Feb 16, 2009 at 12:11 PM, Alexander Konovalenko
>
>  wrote:
>
> > Only your code can have versions. The datastore is not versioned. It
> > is the same single datastore out there that every version of your app
> > can access.
>
> A related question - is there a way to have two versions of datastore
> so that I can run 'production' and 'staging' instances of my app? In
> case, if I want to test new features without messing up the production
> datastore, I can use the staging datastore.
>
> If not, what is the appropriate way to do this?

Deploy the staging code at different appspot subdomain.
--~--~-~--~~~---~--~~
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: Versions and datastore consistency (was Re: Deleting a field in datastore)

2009-02-16 Thread Sridhar Ratnakumar

On Mon, Feb 16, 2009 at 12:11 PM, Alexander Konovalenko
 wrote:
>
> Only your code can have versions. The datastore is not versioned. It
> is the same single datastore out there that every version of your app
> can access.

A related question - is there a way to have two versions of datastore
so that I can run 'production' and 'staging' instances of my app? In
case, if I want to test new features without messing up the production
datastore, I can use the staging datastore.

If not, what is the appropriate way to do this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] query over two properties

2009-02-16 Thread Scott Mahr

This seems like an easy thing to do, but maybe I do not understand
properly the limitations on the datastore.  I would like to find
entries that have at least one of two possible properties equal to a
string.  I have a 'from' and a 'to' property in each entry, I would
like to find entries that are either 'to' or 'from' a certain name.

Thanks,

Scott
--~--~-~--~~~---~--~~
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: difference between GAE and regular web hosting

2009-02-16 Thread Nash-t

$10 per month.
Was this a trick question?
:)

On Feb 15, 2:22 pm, sungpily  wrote:
> Hi,
>
> Probably this question has already been asked before.
>
> What is the difference between GAE and other regular web hosting
> service? With other hosting service, I can use Django, develop web
> application, they give unlimited storage, unlimited bandwidth and I
> get these for under $10 per month. So what is the benefit for using
> GAE?
>
> Thanks a lot in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Versions and datastore consistency (was Re: Deleting a field in datastore)

2009-02-16 Thread Alexander Konovalenko

On Sun, Feb 15, 2009 at 06:08, srid  wrote:
>
> The below app is a blog application.
>
> I tried adding a new post (with field "bar") in the version 2
> instance. As expected, this new post does not appear on the version 1
> site.
>
> I then tried adding a new post (with field "foo") in the version 1
> instance. Surprisingly, this also appears in the version 2 instance.
> Why? How does versioning and datastore work?

Only your code can have versions. The datastore is not versioned. It
is the same single datastore out there that every version of your app
can access. So if there is a difference in how two versions of your
app behave, it must come from the way they work with the datastore.

You should be able to find out what's happening by carefully following
the code and examining the actual contents of the datastore using your
dashboard.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Monitoring HTTP traffic from app engine

2009-02-16 Thread Andrew Badera
Wireshark, netmon, Fiddler ...



On Mon, Feb 16, 2009 at 2:28 PM, Alexander Konovalenko wrote:

>
> On Sat, Feb 14, 2009 at 01:47, Ryan W  wrote:
> >
> > Does anybody have a good method for capturing HTTP traffic between app
> > engine (urlfetch) and the connections it makes, such as for API/Web
> > Service requests?  I've been trying to set up the Charles debugging
> > proxy, but haven't been able to capture the traffic so far.  I'm
> > familiar with the logging feature of app engine and have been using
> > that, but ideally would like a more seamless way to capture the data.
>
> Where are the endpoints of the connection you are trying to debug? Is
> it originating from the dev appserver on your machine or from the
> production urlfetch service? Does the request go to a third-party web
> server or to one of your own servers?
>
> If you control one of the endpoints, you could use a packet sniffer
> such as Wireshark. I am not familiar with Charles but it looks like it
> should do the work, too. So it might be a configuration problem.
> Rereading the docs and making sure you understand how to make the
> requests go through the proxy might help. If it doesn't, the right
> place to ask for help is a Charles-specific help forum or their
> technical support.
>
> If you control neither of the connection endpoints, there is usually
> no way to see the live traffic.
>
> >
>

--~--~-~--~~~---~--~~
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: difference between GAE and regular web hosting

2009-02-16 Thread Andrew Badera
"Unlimited hosting" is NEVER truly unlimited hosting. Read the fine print.
Get one good wave of traffic and you're either offline, or facing a huge
bandwidth bill, despite having an "unlimited" quota on transfer.

Thanks-
- Andy Badera
- and...@badera.us
- (518) 641-1280
- Tech Valley Code Camp 2009.1: http://www.techvalleycodecamp.com/
- Google me: http://www.google.com/search?q=andrew+badera



On Sun, Feb 15, 2009 at 5:22 PM, sungpily  wrote:

>
> Hi,
>
> Probably this question has already been asked before.
>
> What is the difference between GAE and other regular web hosting
> service? With other hosting service, I can use Django, develop web
> application, they give unlimited storage, unlimited bandwidth and I
> get these for under $10 per month. So what is the benefit for using
> GAE?
>
> Thanks a lot in advance.
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: difference between GAE and regular web hosting

2009-02-16 Thread Jonk

On 16 helmi, 00:22, sungpily  wrote:

> What is the difference between GAE and other regular web hosting
> service? With other hosting service, I can use Django, develop web
> application, they give unlimited storage, unlimited bandwidth and I
> get these for under $10 per month. So what is the benefit for using
> GAE?


Hmm.

First thing that comes to mind is that should your site get
Slashdotted, for example, it wouldn't just die. This of course
requires that the site/app is designed with scaling in mind. There are
a lot of good videos available about GAE (by the team), maybe you
should check them out.


jK


--~--~-~--~~~---~--~~
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: Problems uploading new app including salesforce api from Mac OSX

2009-02-16 Thread Geoffrey Spear



On Feb 16, 11:17 am, "steven.head...@gmail.com"
 wrote:
> HTTPError: HTTP Error 403: Forbidden
> Error 403: --- begin server output ---
> You do not have permission to modify this app (app_id=u'pedison').

It looks like you either have the wrong app_id in your app.yaml, or
you're not correctly logging in as an administrator of the application.
--~--~-~--~~~---~--~~
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: Mail Attachments: Can .ics be allowed?

2009-02-16 Thread Alexander Konovalenko

On Sat, Feb 14, 2009, Ben Burleson  wrote:
>
> Are calendar events a security threat or could they be added to the
> safe list?

There's an open issue that you can star to vote for it:
http://code.google.com/p/googleappengine/issues/detail?id=494

--~--~-~--~~~---~--~~
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: Monitoring HTTP traffic from app engine

2009-02-16 Thread Alexander Konovalenko

On Sat, Feb 14, 2009 at 01:47, Ryan W  wrote:
>
> Does anybody have a good method for capturing HTTP traffic between app
> engine (urlfetch) and the connections it makes, such as for API/Web
> Service requests?  I've been trying to set up the Charles debugging
> proxy, but haven't been able to capture the traffic so far.  I'm
> familiar with the logging feature of app engine and have been using
> that, but ideally would like a more seamless way to capture the data.

Where are the endpoints of the connection you are trying to debug? Is
it originating from the dev appserver on your machine or from the
production urlfetch service? Does the request go to a third-party web
server or to one of your own servers?

If you control one of the endpoints, you could use a packet sniffer
such as Wireshark. I am not familiar with Charles but it looks like it
should do the work, too. So it might be a configuration problem.
Rereading the docs and making sure you understand how to make the
requests go through the proxy might help. If it doesn't, the right
place to ask for help is a Charles-specific help forum or their
technical support.

If you control neither of the connection endpoints, there is usually
no way to see the live traffic.

--~--~-~--~~~---~--~~
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: Newbie: AppEngine Launcher 1.1.9 broke Django

2009-02-16 Thread Dmitry

Same problem today. I upgraded appengine-patch to 0.9.4 (was 0.9.3),
problem is gone. Try

http://code.google.com/p/app-engine-patch/downloads/list

On Feb 15, 3:13 pm, Giacecco  wrote:
> All,
> Upgrading to AppEngine 1.1.9 on my Mac OS 10.5.6 has just broken a
> simple Django app I have been working on for a while.
>
> The problem starts since the very InstallAppengineHelperForDjango()
> call in main.py . I still consider myself a newbie with AppEngine, but
> I understand that the error is:
>
> Application configuration could not be read from "./app.yaml"
>
> Of course, app.yaml exists, worked before 1.1.9 and does not look
> particularly wrong now!
>
> I attach my app.yaml and the full error description page. Thank you in
> advance for any suggestion,
>
> Giacecco
>
> === app.yaml ===
> application: giacecco-prod
> version: 1
> runtime: python
> api_version: 1
>
> handlers:
> - url: /static
>   static_dir: static
>
> - url: /favicon.ico
>   static_files: static/favicon.ico
>   upload: static/favicon.ico
>
> - url: .*
>   script: main.py
>
> === full error page ===
>  -->  --> -->
>
> 
> Python 2.5.1: /System/Library/Frameworks/Python.framework/Versions/2.5/
> Resources/Python.app/Contents/MacOS/Python
> Sun Feb 15 13:04:51 2009
>
> A problem occurred in a Python script. Here is the sequence of
> function calls leading up to the error, in the order they occurred.
>  /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/dev_appserver.py in _HandleRequest
> (self= instance at 0x10dd4b8>)
>  2709                               infile,
>  2710                               outfile,
>  2711                               base_env_dict=env_dict)
>  2712         finally:
>  2713           self.module_manager.UpdateModuleFileModificationTimes
> ()
> base_env_dict undefined, env_dict = {'APPLICATION_ID': 'giacecco-
> prod', 'CURRENT_VERSION_ID': '1.1', 'REMOTE_ADDR': '127.0.0.1',
> 'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
> '8080', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
> 1.0'}
>  /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/dev_appserver.py in Dispatch
> (self= at 0x15f26d0>, relative_url='/', path=None, headers= instance at 0x10dd5f8>, infile=,
> outfile=, base_env_dict=
> {'APPLICATION_ID': 'giacecco-prod', 'CURRENT_VERSION_ID': '1.1',
> 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SERVER_NAME':
> 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL': 'HTTP/1.0',
> 'SERVER_SOFTWARE': 'Development/1.0'})
>   378                                       infile,
>   379                                       outfile,
>   380
> base_env_dict=base_env_dict)
>   381
>   382         if forward:
> base_env_dict = {'APPLICATION_ID': 'giacecco-prod',
> 'CURRENT_VERSION_ID': '1.1', 'REMOTE_ADDR': '127.0.0.1',
> 'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
> '8080', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
> 1.0'}
>  /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/dev_appserver.py in Dispatch
> (self= 0x131a270>, relative_url='/', path='main.py',
> headers=,
> infile=,
> outfile=, base_env_dict=
> {'APPLICATION_ID': 'giacecco-prod', 'CURRENT_VERSION_ID': '1.1',
> 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SERVER_NAME':
> 'localhost', 'SERVER_PORT': '8080', 'SERVER_PROTOCOL': 'HTTP/1.0',
> 'SERVER_SOFTWARE': 'Development/1.0'})
>  1996                      infile,
>  1997                      outfile,
>  1998                      self._module_dict)
>  1999       handler.AddDebuggingConsole(relative_url, env, outfile)
>  2000     finally:
> self =  0x131a270>, self._module_dict = {'Cookie':  System/Library/Frameworkframework/Versions/2.5/lib/python2.5/
> Cookie.py'>, 'StringIO':  Framewo...ramework/Versions/2.5/lib/python2.5/StringIO.py'>,
> 'UserDict':  Framewo...ramework/Versions/2.5/lib/python2.5/UserDict.py'>,
> '__future__':  Frame...mework/Versions/2.5/lib/python2.5/__future__.py'>, '__main__':
>  src/giacecco-prod/main.py'>, '_locale':  System/Library/Framewor...rsions/2.5/lib/python2.5/lib-dynload/
> _locale.so'>, '_types': ,
> 'appengine_django':  giacecco...src/giacecco-prod/appengine_django/__init__.pyc'>,
> 'appengine_django.django': None, 'appengine_django.google': None, ...}
>  /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/dev_appserver.py in ExecuteCGI(root_path='/
> Users/giacecco/Documents/www.giacec.co.uk/GAP-src/giacecco-prod',
> handler_path='main.py', 
> cgi_path='/Users/giacecco/Documents/www.giacec.co.uk/GAP-src/giacecco-prod/main.py',
>  env=
> {'APPLICATION_I

[google-appengine] Re: New Limits for Several App Engine Operations

2009-02-16 Thread frank Shi


Because of these limits , leading to the implementation of my program
sometimes unsuccessful.
http://www.delicioustools.com

On 2月14日, 上午6时13分, "Marce (Google)"  wrote:
> For those of you who haven't already heard, we're very excited
> yesterday to have announced that we've raised limits on several App
> Engine operations:
>
> * No more "High CPU Requests"! App Engine Apps were once allowed
> no more than 2 CPU-intensive requests per minute. We've made some
> adjustments to the way we handle requests, and have eliminated this
> limitation altogether. To learn more about how this works and the
> implications for your app, see our documentation.
> * Response deadline raised to 30 seconds. The amount of time an
> App Engine app can take to respond to an incoming request has been
> raised from 10 to 30 seconds! There are limits on the number of
> simultaneous active requests an application can process at any given
> moment--see our docs to learn more.
> * Size limits on code files, static files, and requests/responses
> raised to 10MB! App Engine apps can now receive requests and send
> responses of up to 10MB in size, and users can upload 10MB code and
> static files as well. Note that API requests (e.g. memcache.set(),
> db.put()) are still limited to 1MB in size.
>
> These changes were inspired and driven by a great deal of developer
> feedback, and we're not done! Please let us know what you'd like to
> see next on App Engine .

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK 1.1.9 breaks google-app-engine-django?

2009-02-16 Thread R Warren

Hi,

I am also encountering the same problem as jtaylor and I am running
the same configuration as the poster in this thread:

http://groups.google.com/group/google-appengine/browse_frm/thread/9e9f3715a866b754

(Installed GAE SDK 1.1.9 on Mac OS X 10.5.6 running Python 2.5.1)

I had no problems with GAE prior to this update.

I have posted relevant code/error msgs below, the primary error msg
(the bottom line) is as follows:

 :
Application configuration could not be read from "/Users/robertwarren/
Documents/workspace/BioVenturist/BioVenturist/bioventurist_v0.2/
app.yaml"

Any suggestions as to how to begin fixing this issue would be
appreciated.

Here is my app.yaml:

application: bioventurist
version: 1
runtime: python
api_version: 1

handlers:
- url: /media
  static_dir: media

- url: /static
  static_dir: static

- url: /bvapp/static
  static_dir: bvapp/static

- url: /img
  static_dir: static/img

- url: /img/(.*)
  static_files: static/img/\1
  upload: static/img/(.*)

- url: /.*
  script: common/appenginepatch/main.py

And the error msg:

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in _HandleRequest
(self=)
 2709   infile,
 2710   outfile,
 2711   base_env_dict=env_dict)
 2712 finally:
 2713   self.module_manager.UpdateModuleFileModificationTimes
()
base_env_dict undefined, env_dict = {'APPLICATION_ID': 'bioventurist',
'CURRENT_VERSION_ID': '1.1', 'REMOTE_ADDR': '127.0.0.1',
'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
'8082', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
1.0'}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in Dispatch
(self=, relative_url='/', path=None, headers=, infile=, outfile=,
base_env_dict={'APPLICATION_ID': 'bioventurist', 'CURRENT_VERSION_ID':
'1.1', 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8082', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'})
  378   infile,
  379   outfile,
  380
base_env_dict=base_env_dict)
  381
  382 if forward:
base_env_dict = {'APPLICATION_ID': 'bioventurist',
'CURRENT_VERSION_ID': '1.1', 'REMOTE_ADDR': '127.0.0.1',
'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
'8082', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
1.0'}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in Dispatch
(self=, relative_url='/', path='common/appenginepatch/main.py',
headers=,
infile=,
outfile=, base_env_dict=
{'APPLICATION_ID': 'bioventurist', 'CURRENT_VERSION_ID': '1.1',
'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SERVER_NAME':
'localhost', 'SERVER_PORT': '8082', 'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SOFTWARE': 'Development/1.0'})
 1996  infile,
 1997  outfile,
 1998  self._module_dict)
 1999   handler.AddDebuggingConsole(relative_url, env, outfile)
 2000 finally:
self = , self._module_dict = {'__main__': , 'aecmd': , 'appenginepatcher.aecmd': None,
'appenginepatcher.google': None, 'appenginepatcher.os': None,
'appenginepatcher.sys': None, 'codecs': ,
'common': , 'common.appenginepatch':
, 'common.appenginepatch.main': , ...}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in ExecuteCGI(root_path='/
Users/robertwarren/Documents/workspace/BioVenturist/BioVenturist/
bioventurist_v0.2', handler_path='common/appenginepatch/main.py',
cgi_path='/Users/robertwarren/Documents/workspace/BioVentu...t/
bioventurist_v0.2/common/appenginepatch/main.py', env=
{'APPLICATION_ID': 'bioventurist', 'AUTH_DOMAIN': 'gmail.com',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'application/x-www-form-
urlencoded', 'CURRENT_VERSION_ID': '1.1', 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_LANGUAGE': 'en-
us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', ...},
infile=,
outfile=, module_dict=
{'__main__': , 'aecmd':
, 'appenginepatcher.aecmd': None,
'appenginepatcher.google': None, 'appenginepatcher.os': None,
'appenginepatcher.sys': None, 'codecs': ,
'common': , 'common.appenginepatch':
, 'common.appenginepatch.main': , ...}, exec_script=)
 1914

[google-appengine] Re: BUG: google login in firefox through Actionscript uploader

2009-02-16 Thread Mazhar Hasan

hi!
this is a known flash player bug in firefox that uploading with
authorization fails as cookie is not sent

On Feb 15, 7:50 pm, Danny ZI  wrote:
> While uploading files through firefox when using any as3 uploader
> the google app engine cookie for user login is not reconginzed only on
> this specific request
> all other url request work.
>
> while in expolerer or any other browser this works well

--~--~-~--~~~---~--~~
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] difference between GAE and regular web hosting

2009-02-16 Thread sungpily

Hi,

Probably this question has already been asked before.

What is the difference between GAE and other regular web hosting
service? With other hosting service, I can use Django, develop web
application, they give unlimited storage, unlimited bandwidth and I
get these for under $10 per month. So what is the benefit for using
GAE?

Thanks a lot in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK 1.1.9 breaks google-app-engine-django?

2009-02-16 Thread techmonkey

The same problem occurs in me.
Django included in appengine(1.1.9) is 0.96.1.
http://code.google.com/intl/ja/appengine/articles/django.html

However, django of version 1.0.0 or more is necessary for r73.
Therefore, it is not possible to operate.
How should I do?

On 2月10日, 午後7:35, Matt Brown  wrote:
> Hi Michael,
>
> mcobrien wrote:
> > now that sdk 1.1.9 disallows access to "skipped" files, the
> > LoadAppengineEnvironment() function in the django helper isn't
> > working. It makes a call to LoadAppConfig, which tries to read
> > app.yaml. Since this is a skipped file (it's actually marked as
> > skipped when LoadAppConfig is first called), the read fails.
>
> > Is anyone else having this issue, or is something strange about my
> > config? I'm using the latest google-app-engine-django from svn, and
> > Vista x64.
>
> Yes, this was a problem.
>
> I've just committed r72 and r73 to make the helper compatible with the
> new SDK release.
>
> Please let us know (file an issue in the tracker) if you encounter any
> more instances of the helper attempting to access files that would not
> be present in a production environment.
>
> Cheers
>
> Matt Brown

--~--~-~--~~~---~--~~
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] spell checker

2009-02-16 Thread app engine dude

I an developing a simple website on app engine. I have some html pages
designed and that pages consists of text boxes and text areas for
entering text. I need help regarding the entry, where a red line or
green line should be displayed in case of incorrect entry as in case
of editor.

--~--~-~--~~~---~--~~
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] Problems uploading new app including salesforce api from Mac OSX

2009-02-16 Thread steven.head...@gmail.com

using the following command at the command line i received the
following errors:

sudo /usr/local/bin/appcfg.py update src/ --noisy -v --email
ad...@stevenheadley3228.com


Initiating update.
2009-02-16 10:05:09,158 ERROR appcfg.py:1235 An unexpected error
occurred. Aborting.
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appcfg.py", line 1213, in DoUpload
missing_files = self.Begin()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appcfg.py", line 1009, in Begin
version=self.version, payload=self.config.ToYAML())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appengine_rpc.py", line 303, in Send
f = self.opener.open(req)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 380, in open
response = meth(req, response)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 491, in http_response
'http', request, response, code, msg, hdrs)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 418, in error
return self._call_chain(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 353, in _call_chain
result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 499, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'pedison').
--- end server output ---

Any help would be appreciated

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] list of referenceProperty?

2009-02-16 Thread Pratik C. Rokade

Hello guys,
 can I have list of referenceProperty? How can I fire queries on such property?

Regards,
Pratik.
Sent from my mobile device.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Datastore query on both userproperty and datetimeproperty at the same time

2009-02-16 Thread tijer

I ran into this problem, and it's unclear to my why it doesn't work. I
looked carefully in the documentation and can't see that it should be
an illegal operation, but still, I seem to recieve no results from the
query.

What I'm trying to do is to fetch all the rows in a datastore model
that has a specific userproperty-value AND something newer than a
certain date on a datetimeproperty.

Currently, it looks like this:


  class UserTrack(db.Model):
user = db.UserProperty() # Google user
parentpost = db.ReferenceProperty(reference_class=Post,
collection_name='usertrack_parentpost_tasks')
lastvisit = db.DateTimeProperty(auto_now=True)


  (...)

  user = users.get_current_user()
  datetime_of_current_visit = datetime.utcnow()


  usertrackquery = UserTrack.all()
  usertrackquery.filter('user =', user)
  usertrackquery.filter('lastvisit >', datetime_of_current_visit)
  usertracks = usertrackquery.fetch(limit=25)


If I delete either of the two filters (on user OR on lastvisit) I get
results, but if I take the two together the datastore always returns
None (without an error). I know for sure that some of the rows are
true for both of the two conditions, but still I get None. (actually,
if none of the rows would match I would still get an empty list, and
not None).

Did I break the policy of equality filters and is that why it doesn't
work? If so how? Any ideas?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: How to use remote_api?

2009-02-16 Thread Geoffrey Spear

You need to set your PYTHONPATH to include both the google_appengine/
directory and google_appengine/lib/yaml/

On Feb 15, 8:32 am, kang  wrote:
> I still get the No module named yaml error
>
>
>
> On Sun, Feb 15, 2009 at 3:26 AM, Bill  wrote:
>
> > I've written a blog entry describing how I've gotten the remote_api to
> > work for me:
> >http://billkatz.com/2009/2/Remote-API-Hello-World
>
> > Hope it helps,
> > Bill
>
> > On Feb 13, 3:24 am, lookon  wrote:
> > > I am under Windows. Anyone can tell me how to use remote_api? Thanks.
>
> > > p.s. I met the problem that the appengine module cannot be easily
> > > imported.
>
> --
> Stay hungry,Stay foolish.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK 1.1.9 breaks google-app-engine-django?

2009-02-16 Thread Nuno Maltez

On Thu, Feb 12, 2009 at 8:07 PM, Brett C.  wrote:
> On Feb 10, 4:47 am, Nuno Maltez  wrote:
>> I get the following Warning followed by an Error when I try to access my app:
>>
>> WARNING:root:Blocking access to skipped file
>> "/home/nuno/tmp/work-i18n/.google_appengine/lib/django/django/foo"
>
> That WARNING line is what is causing your trouble. SDK 1.1.9 blocks
> relying on files that will not be uploaded with your application,
> including anything in a directory starting with a dot,
> e.g. .google_appengine. Thus when the Django helper tries to import
> django it gets blocked by dev_appserver since the SDK is living in a
> place that will not be uplaoded with your application.
>
> The fix should be not use the Django helper's little trick of keeping
> your SDK in .google_appengine but instead actually install it, or at
> least keep it outside of your app directory. That should prevent the
> skipped file blocking from interfering with your imports.

Thanks. I installed the SDK on /usr/local and this particular problem
was solved. I still had to apply the changes made in r72 and r73 in
__init__.py to my version of the helper to stop it from trying to
access app.yaml. Now everything's working with the Django version
included on the SDK.

Nuno

--~--~-~--~~~---~--~~
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: self.request.get("userHtmlInput", None) problems

2009-02-16 Thread thebrianschott

Alexander,

Thank you a bunch for your reply (again).
My problem is slightly different, and I think I have solved it as
follows. The problem is the difference between these two conditions. I
need to use them both, but separately as my code below shows.

if prevplace_id is None and nextplace_id is None:
if prevplace_id == '' and nextplace_id == '':

And btw, I finally took the step of adding a dummy application on my
development system which I named "test" that can use be used to test
this sort of question that has both python and html, because I could
not think of a way to make the gae interactive console handle such
situations.

**main.py code below***
import os
from os import environ
import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template

class MainPage(webapp.RequestHandler):
   def get(self):
   nextplace_id = self.request.get("nextplace", None)
   prevplace_id = self.request.get("prevplace", None)
   if prevplace_id is None and nextplace_id is None:
path = os.path.join(os.path.dirname(__file__),
'input.html')
template_values = {
'msg': 'None and None',
}
self.response.out.write(template.render(path,
template_values))
   else:
 if prevplace_id == '' and nextplace_id == '':
logging.info("nextplace_id: %s"%nextplace_id)
logging.info("prevplace_id: %s"%prevplace_id)
path = os.path.join(os.path.dirname(__file__),
'input.html')
template_values = {
'msg': 'Still, None and None',
}
self.response.out.write(template.render(path,
template_values))
 else:
 if nextplace_id is None :
#
logging.info("if nextplace_id: %s"%nextplace_id)
logging.info("if prevplace_id: %s"%prevplace_id)
 else:
#
logging.info("else nextplace_id: %s"%nextplace_id)
logging.info("else prevplace_id: %s"%prevplace_id)


application = webapp.WSGIApplication(
 [('/', MainPage),
  ],
 debug=True)


def main():
run_wsgi_app(application)

if __name__ == "__main__":
main()
** main.py  code above***

**input.html   code below***




  
  
   Next place (only Next or Prev, not both)
   
  
  
   Prev place (only Next or Prev, not both)
 
   

 
  {{msg}}

** input. html   code above***

**app.yamlcode below***
application: test
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: main.py
** app.yaml   code above***


Brian in Atlanta
--~--~-~--~~~---~--~~
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

2009-02-16 Thread Versluys Sander

Hmm maybe. Strangely before upgrading to the newest version of App
Engine I had no problem update to the server.

I will try again with UAC disabled tonight...


On Feb 16, 6:51 am, Barttos  wrote:
> Maybe UAC Control? :-/ Try do disable it.
>
> On Feb 15, 8:47 pm, Versluys Sander  wrote:
>
> > When trying to update a sample project i get following error in
> > command prompt:
>
> > C:\Program Files\Google\google_appengine>appcfg.py update helloworld/
> > Scanning files on local disk.
> > Initiating update.
> > Email: versluyssan...@gmail.com
> > Password for versluyssan...@gmail.com:
> > 2009-02-15 19:41:53,723 ERROR appcfg.py:1235 An unexpected error
> > occurred.
> > ing.
> > Traceback (most recent call last):
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1213, in DoUpload
> >     missing_files = self.Begin()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1009, in Begin
> >     version=self.version, payload=self.config.ToYAML())
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > e_rpc.py", line 312, in Send
> >     self._Authenticate()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > e_rpc.py", line 348, in _Authenticate
> >     self.cookie_jar.save()
> >   File "C:\Python25\lib\_MozillaCookieJar.py", line 118, in save
> >     f = open(filename, "w")
> > IOError: [Errno 13] Permission denied: 'C:\\Users\
> > \Sander/.appcfg_cookies'
> > Traceback (most recent call last):
> >   File "C:\Program Files\Google\google_appengine\appcfg.py", line 60,
> > in 
> >     run_file(__file__, globals())
> >   File "C:\Program Files\Google\google_appengine\appcfg.py", line 57,
> > in ru
> > e
> >     execfile(script_path, globals_)
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1976, in 
> >     main(sys.argv)
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1967, in main
> >     result = AppCfgApp(argv).Run()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1418, in Run
> >     self.action(self)
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1879, in __call__
> >     return method()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1669, in Update
> >     lambda path: open(os.path.join(basepath, path), "rb"))
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1213, in DoUpload
> >     missing_files = self.Begin()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > y", line 1009, in Begin
> >     version=self.version, payload=self.config.ToYAML())
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > e_rpc.py", line 312, in Send
> >     self._Authenticate()
> >   File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \app
> > e_rpc.py", line 348, in _Authenticate
> >     self.cookie_jar.save()
> >   File "C:\Python25\lib\_MozillaCookieJar.py", line 118, in save
> >     f = open(filename, "w")
> > IOError: [Errno 13] Permission denied: 'C:\\Users\
> > \Sander/.appcfg_cookies'
>
> > Anybody an ideo how to solve 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: self.request.get("userHtmlInput", None) problems

2009-02-16 Thread Alexander Kojevnikov

On Feb 16, 12:39 pm, thebrianschott  wrote:
> I am having no luck making with self.request.get() and None. I have
> found the following references, but they do not pan out for me: empty
> user inputs are not detected by the "if" clause.  Please help.

Request.get() returns `default_value` only if the parameter does not
exist in the request. In your case, if the user doesn't enter
anything, both parameters exist and have an empty string as their
value.

Try this code:

def get(self):
nextplace_id = self.request.get('nextplace')
prevplace_id = self.request.get('prevplace')
if prevplace_id or nextplace_id:
  print "we are ready to go now"
else:
  print "you must supply either a Next or Prev place"

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