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

2009-02-17 Thread Jarek Zgoda

I see the same behaviour on OS X, but as it has been stated earlier,
this might be normal.

On 15 Lut, 03:32, "sebastian.ov...@gmail.com"
 wrote:
> Hi All,
>
> I was using SDK under windows without any problem. Now I'm using SDK
> 1.1.9 under Ubuntu and for some reason it doesn't update correctly the
> index.yaml. If I delete it, SDK would recreate it but without any
> index in it (even if I run some queries) and therefore I cannot deploy
> anymore !
>
> from the console:
>
> INFO     2009-02-15 02:29:09,985 dev_appserver_index.py] Updating /
> home/sebas/dev/gae/index.yaml
>
> but it still is empty:
>
> indexes:
>
> # AUTOGENERATED
>
> # This index.yaml is automatically updated whenever the dev_appserver
> # detects that a new type of query is run.  If you want to manage the
> # index.yaml file manually, remove the above marker line (the line
> # saying "# AUTOGENERATED").  If you want to manage some indexes
> # manually, move them above the marker line.  The index.yaml file is
> # automatically uploaded to the admin console when you next deploy
> # your application using appcfg.py.
>
> 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: Google Geocoding not working

2009-02-17 Thread Jarek Zgoda

I use Ajax api variation and it works without problems.

On 17 Lut, 04:14, ehmo  wrote:
> Hey guys,
> i'm trying to use Google Geocoding 
> servicehttp://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: New Limits for Several App Engine Operations

2009-02-17 Thread Jodok Batlogg

awesome! thanks!

jodok

On Feb 13, 11:13 pm, "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] Google authentication in app

2009-02-17 Thread app engine dude

hello.i had my app with custom login interface, now I would like to
integrate my app with google account login. can any 1 help me.i saw
users api but i couldnot come up with it correctly.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google Geocoding not working

2009-02-17 Thread Barry Hunter

I beleive you need to register the key for the {appid}.appspot.com
domain, due to the way urlfetch sends the HTTP referer header. (even
if you

However appengine is a shared system and urlfetch uses a proxy and the
API geocoder limits requests by IP address. For that reason Jarek's
advice to use the ajax method is probably best - that way the request
comes from the users IP which is less likly to be throttled.

On 17/02/2009, ehmo  wrote:
>
>  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
>  >
>


-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
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-17 Thread Versluys Sander

@Greg

Cron jobs or scheduled tasks are on the roadmap! :-) Yay!

On Feb 17, 5:46 am, Greg  wrote:
> 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] Re: Requests going twice

2009-02-17 Thread Anthony

I had this problem.. check you have a static mapping in for
favicon.ico in your app.yaml (and above your Init one) or just use "/"
for your index handler.

Your "/.*" mapping will send all request to Init, including anything
else the browser looks for like the favicon, images or scripts not
caught with other handlers. So you end up processing a few extra
requests each page load.




On Feb 17, 4:25 am, 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: Google Geocoding not working

2009-02-17 Thread ehmo

I did register it for API key but it's not working. I tried almost
everything, and now i just made another script on another domain,
which is doing all this thing instead of GAE. But it's annoying if i
can't use google service in google service.

ehmo


Barry wrote,

> I beleive you need to register the key for the {appid}.appspot.com
> domain, due to the way urlfetch sends the HTTP referer header. (even
> if you

> However appengine is a shared system and urlfetch uses a proxy and the
> API geocoder limits requests by IP address. For that reason Jarek's
> advice to use the ajax method is probably best - that way the request
> comes from the users IP which is less likly to be throttled.

> On 17/02/2009, ehmo  wrote:
>>
>>  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] Call class from another class

2009-02-17 Thread ehmo

Hey,
i've this two classed

class New(webapp.RequestHandler):
  def __init__(self):
self.dateTime = datetime.datetime.now()

  def get(self):
new_nick = cgi.escape(self.request.get('nick'))

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

""" call new with nick """

and i want to call the New class from MainHandler and support to New
class the nick name, and do something with it.

How can i do that?

Thnx
--~--~-~--~~~---~--~~
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] Calling a SOAP Web Service

2009-02-17 Thread Doug

Good Monring All,

I was wondering if anyone has been able to create a SOAP Client that
would run in GAE.  I was able to create a client using wsdl2py and it
runs correctly outside of GAE, but it will not run in GAE.  The error
that I get in GAE is "'module' object has no attribute 'getaddrinfo'"
and from the research I have done I beleive that the error is caused
by the socket module being disabled in GAE.

I have been playing with the urlfetch, but I have not be able to
successfully call a SOAP web service using it.

So, if anyone has been able to create a SOAP cleint in GAE I would
love to know how you did it.

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



[google-appengine] Re: CPU accounting for Datastore writes and pricing feedback

2009-02-17 Thread Sharp-Developer.Net

Hi Diomedes,

Pitty you have not got any reply yet as the question is very valid and
interesting.

I'm not Google representative, just a newbie GAE developer and will
share my assumptions.

As I understand the GAE is more suitable for apps where writes are
triggered by user actions.

And any kind of statistics/logging/etc systems are not best candidates
to implement in GAE.

This all about BigTable design limitations. My understanding it was
designed to have much less writes then reads.

Like 1 user write a post/twitt and hundreds are reading it.

In you case even with all optimizations you have exactly oppozite -
lot's of writes and just few reads.

So I think you could have big problems to use GAE effectivly and
benefit from all it features.
--
Alexander Trakhimenok

On Feb 17, 5:01 am, diomedes  wrote:
> 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
>

[google-appengine] Re: CPU accounting for Datastore writes and pricing feedback

2009-02-17 Thread Dave Warnock

Diomedes,

I wonder if you can spread the load in some way. For example

- a report application that grabs the data via api calls to a data
store app, does processing and shoves it in memcache.

- a set of capture apps that collect data in batches and then use api
calls to the data store app to dump the data

- you could even shard the data store app by segmenting the data. The
capture and report apps would write to the appropriate data store.

each customer then gets their own 3 separate apps (capture, store and
report) which should keep costs as low as possible. If required you
can have multiple versions of each layer.

Obviously key problems are complexity (but clean REST API's should
keep that to a minimum) and time lag between capture and report.

Just an idea of the top of my head (and you would need to check terms
of service would be ok with this).

Dave
-- 
Dave Warnock: http://42.blogs.warnock.me.uk

--~--~-~--~~~---~--~~
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: Accept-Encoding disabled for urlfetch.fetch on local dev server?

2009-02-17 Thread HG

that puzzles me also.
fortunately, in the appengine ENV the Accept-Encoding was handled
transparently.
but in the development app box. the accept-encoding disabled, that's
not advantageous when developing.
as the temporary solution,i added a replace interface,that support the
accept-encodeing header, in myself lib when develop instead of
urlfetch :
looks like:

import sys,os
if (os.environ['SERVER_SOFTWARE']).find('Development') == -1: #in
the appengine box
from google.appengine.api import urlfetch
else:  # in the develop appserver
from common import urlfetch
in urlfetch.py:



class Respon(object):
content = None
status_code = ""
headers = {}
def fetch(url,headers ={'Accept-Encoding':'gzip'}):
import urllib2, httplib
import os,sys
import StringIO
sys.path.insert(0,os.environ['PROJECT_ROOT'])
request = urllib2.Request('')
respon = Respon()
request = urllib2.Request(url)
for k,v in headers.iteritems():
request.add_header( k , v)
opener = urllib2.build_opener()
f = opener.open(request)
data= f.read()
if (f.headers.get('Content-Encoding','')).find('zip') == 1 :
#zipped
import gzip,StringIO
compressedstream = StringIO.StringIO(data)
gzipper = gzip.GzipFile(fileobj=compressedstream)
data = gzipper.read()
respon.content = data
respon.status_code = str(f.code)
respon.headers = dict(f.headers)
return respon


On Feb 10, 1:32 am, Tony Arkles  wrote:
> Hi,
>
> We're using urlfetch to access Yahoo Boss, which requires "Accept-
> Encoding: gzip" in the HTTP headers.
>
> The documentation doesn't indicate that this is a "forbidden" 
> header:http://code.google.com/appengine/docs/python/urlfetch/fetchfunction.html
>
> The code works great on the live server, but on the dev_appserver, the
> "Accept-Encoding" header is stripped out before the request is sent
> out.  From urlfetch_stub.py:
>
> _UNTRUSTED_REQUEST_HEADERS = frozenset([
>   'accept-encoding',
>   'content-length',
>   'host',
>   'referer',
>   'user-agent',
>   'vary',
>   'via',
>   'x-forwarded-for',
> ])
>
> Any idea why this is happening?  Is this by design, or is this a bug
> on the local appserver code?
>
> Cheers
> 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 1.1.9 and users.create_login_url NotAllowedError for Google App ID Deployment

2009-02-17 Thread Alexander Vasiljev

see an issue http://code.google.com/p/googleappengine/issues/detail?id=1058.
Please star it so it would attract attention.

--~--~-~--~~~---~--~~
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] Getting 500 error message

2009-02-17 Thread Greg

I created a simple contact management application for a non-profit
using app engine. Things were going OK when all of a sudden I got a
500 error message today. As far as I know, the code wasn't be updated
before the problem happened.

Any ideas?

Greg

--~--~-~--~~~---~--~~
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] save a file in the harddisk?

2009-02-17 Thread gxtiou

can gae allow us to save a file in the harddisk?

--~--~-~--~~~---~--~~
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: NotAllowedError while redirecting to the login page

2009-02-17 Thread ID

I'm having this same problem (i think)

I have setup an app 'idnet1' that is restricted to domain
'ismetdere.com'

uploaded my working app, mapped my domain.

http://idnet1.ismetdere.com/ shows 400 bad request
http://idnet1.appspot.com/ shows notAlloved error


On Feb 13, 1:15 am, Marzia Niccolai  wrote:
> Hi,
>
> This restriction had originally been in place, but it broke a few months
> back.  It was recently fixed, hence the change in behavior you noticed.
>
> -Marzia
>
> On Thu, Feb 12, 2009 at 5:54 AM, Mayank Sharma  wrote:
>
> > Hi Marzia,
>
> > Thanks for your help. I could get my application working once I moved
> > it to my domain from appspot.com. But why is this restriction
> > introduced? I think things were quite good with *.appspot.com
>
> > -Mayank
>
> > On Feb 12, 12:25 am, Marzia Niccolai  wrote:
> > > Hi,
>
> > > If you restrict authentication to a specific domain, when a user is
> > logged
> > > in it must also serve off of that domain.
>
> > > -Marzia
>
> > > On Tue, Feb 10, 2009 at 7:50 PM, Mayank Sharma 
> > wrote:
>
> > > > Hi,
>
> > > > I have a google app with authentication restricted only to my google
> > > > apps domain users. I am using the following code to redirect the user
> > > > to login in case the user is not logged in.
>
> > > >   self.redirect(users.create_login_url("/"))
>
> > > > This was working fine until yesterday (before the 1.1.9 release), But
> > > > today when I go to homepage of my app, instead of redirecting to the
> > > > login page, I get the following error.
>
> > > > Traceback (most recent call last):
> > > >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > > __init__.py", line 501, in __call__
> > > >    handler.get(*groups)
> > > >  File "/base/data/home/apps/zebuengine/2.331336139814018406/main.py",
> > > > line 90, in get
> > > >    redirect_address = users.create_login_url("http://
> > > > zebuengine.appspot.com/")
> > > >  File "/base/python_lib/versions/1/google/appengine/api/users.py",
> > > > line 156, in create_login_url
> > > >    raise NotAllowedError
> > > > NotAllowedError
>
> > > > This is still working fine for my application in which i have
> > > > authentication set to gmail users. But not working now only for my
> > > > google apps domain users. Is something broken in the new release?
>
> > > > Regards,
> > > > Mayank

--~--~-~--~~~---~--~~
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-17 Thread Geoffrey Spear



On Feb 17, 11:15 am, Dave Warnock  wrote:
> - a report application that grabs the data via api calls to a data
> store app, does processing and shoves it in memcache.

Relying on memcache as reliable storage even temporarily is almost
certainly a bad idea.
--~--~-~--~~~---~--~~
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: save a file in the harddisk?

2009-02-17 Thread Geoffrey Spear

no.  use the datastore.

On Feb 17, 2:01 am, gxtiou  wrote:
> can gae allow us to save a file in the harddisk?
--~--~-~--~~~---~--~~
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-17 Thread Dave Warnock

Geoffrey,

>> - a report application that grabs the data via api calls to a data
>> store app, does processing and shoves it in memcache.
>
> Relying on memcache as reliable storage even temporarily is almost
> certainly a bad idea.

Agreed. But a report server would not be doing so. If the data is not
available via memcache it would grab it via api calls to the data
store app. Ok slower then than direct bigtable access but just the
same principal (except maybe you add a bit more processing between
bigtable and memcache to get the data ready for the report).

Dave--
Dave Warnock: http://42.blogs.warnock.me.uk

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



[google-appengine] Re: Google Apps and Gmail Login. :D

2009-02-17 Thread Marzia Niccolai
Hi,

No, this is a different issue.  This just means that any email can become a
Google Account, even if that email is a Google Apps account.

-Marzia

On Fri, Feb 13, 2009 at 9:20 PM, gops  wrote:

>
>
> http://code.google.com/p/googleappengine/issues/detail?id=56&q=google%20apps%20and%20google%20login&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component
>
> is this same as , saying that , above issue is resolved ?
>
> Thanks for the reply.
>
> On Feb 13, 9:42 pm, Marzia Niccolai  wrote:
> > Hi,
> >
> > Any account and be a Google Account, these aren't restricted to only
> emails
> > ending with @gmail.com.  In fact, what is happening is that the Google
> Apps
> > account f...@bar.com is registered with both services, Google Apps and
> Google
> > Accounts.  Even though the emails are the same, these are actually two
> > distinct accounts.
> >
> > -Marzia
> >
> > On Fri, Feb 13, 2009 at 12:27 AM, gops  wrote:
> >
> > > I encountered a particularly exciting feature ...
> >
> > > A application which i have create to accept only gmail login is now
> > > able to accept google apps account too. i.e. it can handle both gmail
> > > login , like f...@gmail.com and apps login like f...@bar.com
> > > simultaneoulsly.
> >
> > > Is it by error ? ... or is it already been there and I haven't noticed
> > > it ? ..
> >
> > > Second and Important thing is ::
> >
> > > Is it a consistent behaviour , and can we build application upon 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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Domain squatting on App Engine

2009-02-17 Thread Marzia Niccolai
Hi,

Let me emphasis that this is currently *not* the case.  In fact, if you want
to be able to send/receive email from ap...@gmail.com, you *must* register
this gmail name before creating the app id with App Engine.

-Marzia

On Sat, Feb 14, 2009 at 4:33 PM, Ian Lewis  wrote:

> I'm guessing the gmail shared namespace limitation has to do with being
> able to the forthcoming release that allows apps to recieve mail (presumably
> at @gmail.com). This is probably something they thought about in
> the beginning but just didn't implement.
>
> On Sun, Feb 15, 2009 at 7:56 AM, Alexander Konovalenko 
> wrote:
>
>>
>> There's an issue to remove the Gmail shared namespace limitation:
>> http://code.google.com/p/googleappengine/issues/detail?id=479
>>
>> Also, Marzia says that they don't allow similar names. For example, if
>> 'appid' is already registered, you won't be able to create an app
>> called 'app1d'.
>>
>>
>>
>
>
> --
> ===
> 株式会社ビープラウド  イアン・ルイス
> 〒150-0012
> 東京都渋谷区広尾1-11-2アイオス広尾ビル604
> email: ianmle...@beproud.jp
> TEL:03-5795-2707
> FAX:03-5795-2708
> http://www.beproud.jp/
> ===
>
>
> >
>

--~--~-~--~~~---~--~~
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: list of referenceProperty?

2009-02-17 Thread Marzia Niccolai
Hi,

You can have a list of key objects, and you can just use db.get(Key) to
retrieve any entry in the list.

-Marzia

On Sun, Feb 15, 2009 at 9:27 PM, Pratik C. Rokade
wrote:

>
> 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] Re: Intercepting Model Creation

2009-02-17 Thread Andy Freeman

Please star http://code.google.com/p/googleappengine/issues/detail?id=844
.

The fix is for the db.get code to pass in __entity during model
creation time so db.Model.__init__ can set it.

On Feb 16, 5:36 pm, RobertG  wrote:
> 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] unicode username in cookie value

2009-02-17 Thread Adrian Scott . com

http://groups.google.com/group/google-appengine/browse_thread/thread/3674ba3ddffe29a5/da79c3298fa4160a?lnk=gst&q=unicode#

this is giving me plenty of fun when looking at storing a username in
cookie values with special characters, e.g. adrián ;)


see y'all in tomorrow's chat,

-adrian

www.adrianscott.com

--~--~-~--~~~---~--~~
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 stop local gae web dev server?

2009-02-17 Thread Adrian Scott . com

Ah Thanks!!

Forgot to RTM

nice to have docs ;)

-a


On Feb 13, 10:39 am, Tony Smith  wrote:
> HeyAdrian,
>
> Killing the job is the only way documented on documentation 
> server:http://code.google.com/appengine/docs/python/tools/devserver.html
> (To stop the web server: With Windows, press Control-Break in your
> command prompt window. With Mac OS X or Unix, press Control-C.)
>
> Why are you looking for another way to stop it?
>
> Tony
>
> On Feb 13, 10:35 am, "AdrianScott. com" 
> wrote:
>
>
>
> > Hi,
>
> > Is there any way to stop the local GAE web dev server, aside from
> > killing the job?
>
> > I'm on Windows using cmd.exe command window...
>
> > Same goes for trying manage.py runserver  for app-engine-patch
> > django...
>
> > thanks!!
>
> > -Adrianhttp://www.adrianscott.com/- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Another person with Urlfetch problems

2009-02-17 Thread Faber Fedor
I'just getting back to my AppEngine app after playing with my Android app.
I made a few changes to the GAE app, uploaded it and immediately got the
following error when I started testing:

Traceback (most recent call last):
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py",
line 503, in __call__
handler.post(*groups)
  File "/base/data/home/apps/lbtdl/2.331489020577168574/lbtdl.py",
line 131, in post
location.lookupGeocode()
  File "/base/data/home/apps/lbtdl/2.331489020577168574/Location.py",
line 122, in lookupGeocode
self.geoHash = self.getGeohash()
  File "/base/data/home/apps/lbtdl/2.331489020577168574/Location.py",
line 137, in getGeohash
geohashText = urlfetch.fetch(geohashUrl)
  File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py",
line 267, in fetch
raise DownloadError(str(e))
DownloadError: ApplicationError: 2


I've checked the URL in question (
http://geohash.org?q=34.123453%2C-118.148759&format=url&redirect=0) and it
works, both in URL-encoded form and non (it's just numbers and a comma, no
spaces or anything).  The code works locally.  I've upgraded to SDK 1.1.9.
Everything still looks good.  BTW, the function that is blowing up had no
changes made to it.

Where do I look now?


-- 
Faber Fedor
Linux New Jersey
http://linuxnj.com
faberfedor.blogspot.com

--~--~-~--~~~---~--~~
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-17 Thread Marzia Niccolai
Hi,

To clarify, the datastore does support the AND operator, but it does _not_
support the OR operator.

-Marzia

On Mon, Feb 16, 2009 at 4:32 PM, djidjadji  wrote:

>
> 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: Domain squatting on App Engine

2009-02-17 Thread Barry Hunter

How does that work?

 I am unable to get a app with the same appid as even MY gmail
address. (ie cant seem to get barrybhunter.appspot.com)

On 17/02/2009, Marzia Niccolai  wrote:
> Hi,
>
> Let me emphasis that this is currently *not* the case.  In fact, if you want
> to be able to send/receive email from ap...@gmail.com, you *must* register
> this gmail name before creating the app id with App Engine.
>
> -Marzia
>
>
> On Sat, Feb 14, 2009 at 4:33 PM, Ian Lewis  wrote:
> > I'm guessing the gmail shared namespace limitation has to do with being
> able to the forthcoming release that allows apps to recieve mail (presumably
> at @gmail.com). This is probably something they thought about in
> the beginning but just didn't implement.
> >
> >
> >
> > On Sun, Feb 15, 2009 at 7:56 AM, Alexander Konovalenko 
> wrote:
> >
> > >
> > > There's an issue to remove the Gmail shared namespace limitation:
> > >
> http://code.google.com/p/googleappengine/issues/detail?id=479
> > >
> > > Also, Marzia says that they don't allow similar names. For example, if
> > > 'appid' is already registered, you won't be able to create an app
> > > called 'app1d'.
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > ===
> > 株式会社ビープラウド  イアン・ルイス
> > 〒150-0012
> > 東京都渋谷区広尾1-11-2アイオス広尾ビル604
> > email: ianmle...@beproud.jp
> > TEL:03-5795-2707
> > FAX:03-5795-2708
> > http://www.beproud.jp/
> > ===
> >
> >
> >
> >
> >
> >
>
>
>  >
>

--~--~-~--~~~---~--~~
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: 502 server error appears google appengine? Why

2009-02-17 Thread Marzia Niccolai
Hi,

Also, please check your application logs, as this may give some indication
as to what error has occurred.  Logs can be found at
http://appengine.google.com/logs?&app_id=YOURAPPID

-Marzia

On Mon, Feb 16, 2009 at 10:54 PM, app engine dude
wrote:

>
> 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: Domain squatting on App Engine

2009-02-17 Thread Barry Hunter

Ah, are you saying 'instead of', rather than 'before' (which would
imply you can do both)

"you *must* register this gmail name [instead of] creating the app id
with App Engine."



On 17/02/2009, Barry Hunter  wrote:
> How does that work?
>
>   I am unable to get a app with the same appid as even MY gmail
>  address. (ie cant seem to get barrybhunter.appspot.com)
>
>
>  On 17/02/2009, Marzia Niccolai  wrote:
>  > Hi,
>  >
>  > Let me emphasis that this is currently *not* the case.  In fact, if you 
> want
>  > to be able to send/receive email from ap...@gmail.com, you *must* register
>  > this gmail name before creating the app id with App Engine.
>  >
>  > -Marzia
>  >
>  >
>  > On Sat, Feb 14, 2009 at 4:33 PM, Ian Lewis  wrote:
>  > > I'm guessing the gmail shared namespace limitation has to do with being
>  > able to the forthcoming release that allows apps to recieve mail 
> (presumably
>  > at @gmail.com). This is probably something they thought about in
>  > the beginning but just didn't implement.
>  > >
>  > >
>  > >
>  > > On Sun, Feb 15, 2009 at 7:56 AM, Alexander Konovalenko 
> 
>  > wrote:
>  > >
>  > > >
>  > > > There's an issue to remove the Gmail shared namespace limitation:
>  > > >
>  > http://code.google.com/p/googleappengine/issues/detail?id=479
>  > > >
>  > > > Also, Marzia says that they don't allow similar names. For example, if
>  > > > 'appid' is already registered, you won't be able to create an app
>  > > > called 'app1d'.
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > > >
>  > >
>  > >
>  > >
>  > > --
>  > > ===
>  > > 株式会社ビープラウド  イアン・ルイス
>  > > 〒150-0012
>  > > 東京都渋谷区広尾1-11-2アイオス広尾ビル604
>  > > email: ianmle...@beproud.jp
>  > > TEL:03-5795-2707
>  > > FAX:03-5795-2708
>  > > http://www.beproud.jp/
>  > > ===
>  > >
>  > >
>  > >
>  > >
>  > >
>  > >
>  >
>  >
>  >  >  >
>  >
>


-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

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



[google-appengine] Re: Google Geocoding not working

2009-02-17 Thread Marzia Niccolai
Hi,

You should not have any problems using Maps geocoding on App Engine, you
just need to register the correct domain to get an API key.

A simple example of this can be found here:
http://code.google.com/appengine/articles/geosearch.html

If you are having problems with your Maps key, I would suggest Google Maps
API support:
http://groups.google.com/group/Google-Maps-API

-Marzia

On Tue, Feb 17, 2009 at 3:54 AM, ehmo  wrote:

>
> I did register it for API key but it's not working. I tried almost
> everything, and now i just made another script on another domain,
> which is doing all this thing instead of GAE. But it's annoying if i
> can't use google service in google service.
>
> ehmo
>
>
> Barry wrote,
>
> > I beleive you need to register the key for the {appid}.appspot.com
> > domain, due to the way urlfetch sends the HTTP referer header. (even
> > if you
>
> > However appengine is a shared system and urlfetch uses a proxy and the
> > API geocoder limits requests by IP address. For that reason Jarek's
> > advice to use the ajax method is probably best - that way the request
> > comes from the users IP which is less likly to be throttled.
>
> > On 17/02/2009, ehmo  wrote:
> >>
> >>  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: Getting 500 error message

2009-02-17 Thread Marzia Niccolai
Hi Greg,

The best thing to do is to check the logs for your application:
http://appengine.google.com/logs?&app_id=YOURAPPID

This should give some indication of why you are getting a 500 error message.

-Marzia

On Mon, Feb 16, 2009 at 10:57 PM, Greg  wrote:

>
> I created a simple contact management application for a non-profit
> using app engine. Things were going OK when all of a sudden I got a
> 500 error message today. As far as I know, the code wasn't be updated
> before the problem happened.
>
> Any ideas?
>
> Greg
>
> >
>

--~--~-~--~~~---~--~~
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: Another person with Urlfetch problems

2009-02-17 Thread Marzia Niccolai
Hi,

Application Error 2 indicates that the remote server is returning an error
when we attempt to fetch it.  Is there a possibility that this URL has
certain header restrictions/requirements?  That would be my first guess.

-Marzia

On Tue, Feb 17, 2009 at 9:59 AM, Faber Fedor  wrote:

> I'just getting back to my AppEngine app after playing with my Android
> app.   I made a few changes to the GAE app, uploaded it and immediately got
> the following error when I started testing:
>
> Traceback (most recent call last):
>
>   File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", 
> line 503, in __call__
> handler.post(*groups)
>   File "/base/data/home/apps/lbtdl/2.331489020577168574/lbtdl.py", line 131, 
> in post
>
> location.lookupGeocode()
>   File "/base/data/home/apps/lbtdl/2.331489020577168574/Location.py", line 
> 122, in lookupGeocode
> self.geoHash = self.getGeohash()
>   File "/base/data/home/apps/lbtdl/2.331489020577168574/Location.py", line 
> 137, in getGeohash
>
> geohashText = urlfetch.fetch(geohashUrl)
>   File "/base/python_lib/versions/1/google/appengine/api/urlfetch.py", line 
> 267, in fetch
> raise DownloadError(str(e))
> DownloadError: ApplicationError: 2
>
>
> I've checked the URL in question (
> http://geohash.org?q=34.123453%2C-118.148759&format=url&redirect=0) and it
> works, both in URL-encoded form and non (it's just numbers and a comma, no
> spaces or anything).  The code works locally.  I've upgraded to SDK 1.1.9.
> Everything still looks good.  BTW, the function that is blowing up had no
> changes made to it.
>
> Where do I look now?
>
>
> --
> Faber Fedor
> Linux New Jersey
> http://linuxnj.com
> faberfedor.blogspot.com
>
> >
>

--~--~-~--~~~---~--~~
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: list of referenceProperty?

2009-02-17 Thread Brandon Thomson

List of referenceProperty's in the datastore does not seem to work. I
got around this for my app by using a list of "db.Key"s. Then instead
of using a query I just fetch all the keys. I think I have seen some
other workarounds so maybe someone else can chime in with a way to
filter the keys or run a query if you really need that behavior.

On Feb 16, 12:27 am, "Pratik C. Rokade" 
wrote:
> 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] Re: Another person with Urlfetch problems

2009-02-17 Thread Faber Fedor
On Tue, Feb 17, 2009 at 1:38 PM, Marzia Niccolai  wrote:

> Hi,
>
> Application Error 2 indicates that the remote server is returning an error
> when we attempt to fetch it.  Is there a possibility that this URL has
> certain header restrictions/requirements?  That would be my first guess.


How could I tell? It's never had any in the past.  There's no mention of any
changes over on their site.  I can run it just fine locally from the dev
server, the browser and curl.



-- 
Faber Fedor
Linux New Jersey
http://linuxnj.com
faberfedor.blogspot.com

--~--~-~--~~~---~--~~
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-17 Thread Versluys Sander

I've tried again with UAC disabled but it doesn't seem to help.

Somebody any other ideas as to why i get a Errno 13 permission denied
as you can see in my initial post?

Thanks!

On 16 feb, 06:51, 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: [Errno13] 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: [Errno13] 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: CPU accounting for Datastore writes and pricing feedback

2009-02-17 Thread diomedes

@alexander
I agree that implementing a "few reads/lots of writes" app on GAE is
not the easy/typical case.
GAE with the current planned pricing is a perfect deal for small lots-
reads/few writes sites (almost free)
is a great deal for large (lots-reads/few writes) sites (better than
ec2 )
and and is a not a such a good deal for a (few-reads/lots writes) app.
On the other hand, running a beacon service (whether you are serving
ads, or running stats) has significant scalability challenges anyway
and I am willing to take on the challenge to implement it on GAE to
leverage its scalability even if that means that the there will not be
much "profit margin" left.

@dave
I have followed exactly the architecture you suggest internally : 3
web services:
The first I call "recorder: (your capturer) - just captures the beacon
hit
The second I call the "processor" (your "store") it updates the
structures and incurs most of the CPU cost  (in your suggestion you
spread some of that CPU load to the reporter and that could be a
promising alternative)
The third, the reporter, which is really a Google Data Source
implementation  fetches from data store the precalculated chart data
and drives google chart based reports
I do the break up to 1) improve batching 2) make beacon hits fast  3)
make the reporting fast
Doing that breakup as fully independent apps doesn't actually change
the cost per se  (except if you take into account the free first 5M
hits).

@geoffrey
> Relying on memcache as reliable storage even temporarily is almost
> certainly a bad idea.
Geoffrey, I am taking a gamble with this:
GAE currently misses the concept of a file system "logfile" : a very
efficient (think cheap) append-only buffered file - that sequences
chronologically all writes received from web servers. Thats what they
use internally to implement the apache log facility.
The only way to simulate this is via memcached.
So I have implemented the equivalent of a "Buffered Append Only
LOGFILE", which accumulates writes in mem,  and every 100 lines or
1minute (which ever happens first) flushes to the disk.
Remember that OS-based logfiles also do not guarantee persistence
until the "flush" actually happened.
If it "behaves" as expected I will suggest it to the gaeutilities
guys. My hope is that a frequently accessed memcached item doesn't
disappear in 30-60 secs except in rare cases - and log files are ok
with that - they are not truly transactional storage.

diomedes

On Feb 17, 9:25 am, Dave Warnock  wrote:
> Geoffrey,
>
> >> - a report application that grabs the data via api calls to a data
> >> store app, does processing and shoves it in memcache.
>
> > Relying on memcache as reliable storage even temporarily is almost
> > certainly a bad idea.
>
> Agreed. But a report server would not be doing so. If the data is not
> available via memcache it would grab it via api calls to the data
> store app. Ok slower then than direct bigtable access but just the
> same principal (except maybe you add a bit more processing between
> bigtable and memcache to get the data ready for the report).
>
> Dave--
> Dave Warnock:http://42.blogs.warnock.me.uk
--~--~-~--~~~---~--~~
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 question: can i used the just released remote_api to import data from xml-rpc endpoint

2009-02-17 Thread Marzia Niccolai
Hi,

Bill Katz wrote a great tutorial on how to setup and use the Remote API:
http://billkatz.com/2009/2/Remote-API-Hello-World

Essentially, with the Remote API, you can write a Python script to run on
your machine, and have it operate on your App Engine datastore.

-Marzia

On Sat, Feb 14, 2009 at 2:29 AM, que0x  wrote:

>
> Hey Folks,
> I need to import data to the data store using a xml-rpc client , is
> that doable ?
>
> 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] Reminder: App Engine chat time, tomorrow (2/18) 9-10AM

2009-02-17 Thread Marzia Niccolai
Details about App Engine chat time can be found here:
http://groups.google.com/group/google-appengine/browse_thread/thread/8ea64f610b5ed428

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



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

2009-02-17 Thread Jeff S

Hi tijer,

Is it possible that there are simply no results for the two-filter
query? It looks like when inserting a new UserTrack entity, the user
is set to the current user and the lastvisit time is set to now. So I
imagine looking for a UserTrack where lastvisit > now may not have
very many results, lastvisit < now would likely have more.

Happy coding,

Jeff

On Feb 16, 9:13 am, tijer  wrote:
> 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: CPU accounting for Datastore writes and pricing feedback

2009-02-17 Thread Marzia Niccolai
Hi,

We are still determining how to appropriately calculate the CPU to take in
to account both runtime and various API's CPU.  I don't have any specific
details yet on how datastore CPU will factor in to this calculation, but
rest assured we'll let you know.

-Marzia

On Tue, Feb 17, 2009 at 10:59 AM, diomedes  wrote:

>
> @alexander
> I agree that implementing a "few reads/lots of writes" app on GAE is
> not the easy/typical case.
> GAE with the current planned pricing is a perfect deal for small lots-
> reads/few writes sites (almost free)
> is a great deal for large (lots-reads/few writes) sites (better than
> ec2 )
> and and is a not a such a good deal for a (few-reads/lots writes) app.
> On the other hand, running a beacon service (whether you are serving
> ads, or running stats) has significant scalability challenges anyway
> and I am willing to take on the challenge to implement it on GAE to
> leverage its scalability even if that means that the there will not be
> much "profit margin" left.
>
> @dave
> I have followed exactly the architecture you suggest internally : 3
> web services:
> The first I call "recorder: (your capturer) - just captures the beacon
> hit
> The second I call the "processor" (your "store") it updates the
> structures and incurs most of the CPU cost  (in your suggestion you
> spread some of that CPU load to the reporter and that could be a
> promising alternative)
> The third, the reporter, which is really a Google Data Source
> implementation  fetches from data store the precalculated chart data
> and drives google chart based reports
> I do the break up to 1) improve batching 2) make beacon hits fast  3)
> make the reporting fast
> Doing that breakup as fully independent apps doesn't actually change
> the cost per se  (except if you take into account the free first 5M
> hits).
>
> @geoffrey
> > Relying on memcache as reliable storage even temporarily is almost
> > certainly a bad idea.
> Geoffrey, I am taking a gamble with this:
> GAE currently misses the concept of a file system "logfile" : a very
> efficient (think cheap) append-only buffered file - that sequences
> chronologically all writes received from web servers. Thats what they
> use internally to implement the apache log facility.
> The only way to simulate this is via memcached.
> So I have implemented the equivalent of a "Buffered Append Only
> LOGFILE", which accumulates writes in mem,  and every 100 lines or
> 1minute (which ever happens first) flushes to the disk.
> Remember that OS-based logfiles also do not guarantee persistence
> until the "flush" actually happened.
> If it "behaves" as expected I will suggest it to the gaeutilities
> guys. My hope is that a frequently accessed memcached item doesn't
> disappear in 30-60 secs except in rare cases - and log files are ok
> with that - they are not truly transactional storage.
>
> diomedes
>
> On Feb 17, 9:25 am, Dave Warnock  wrote:
> > Geoffrey,
> >
> > >> - a report application that grabs the data via api calls to a data
> > >> store app, does processing and shoves it in memcache.
> >
> > > Relying on memcache as reliable storage even temporarily is almost
> > > certainly a bad idea.
> >
> > Agreed. But a report server would not be doing so. If the data is not
> > available via memcache it would grab it via api calls to the data
> > store app. Ok slower then than direct bigtable access but just the
> > same principal (except maybe you add a bit more processing between
> > bigtable and memcache to get the data ready for the report).
> >
> > Dave--
> > Dave Warnock:http://42.blogs.warnock.me.uk
> >
>

--~--~-~--~~~---~--~~
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_appengine/dev_appserver.py helloworld/

2009-02-17 Thread nico-n

Exactly where do I enter this command to start the Google Appengine
server? (I'm just starting with the helloworld app.

--~--~-~--~~~---~--~~
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] clean urls?

2009-02-17 Thread John

I'm trying to do the following:

In app.yaml:

- url: /product/id/([0-9]*)/
  script: product.py?id=\1

but its not working, seems to ignore the query string. Is there any
way I can get this to work?

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: google_appengine/dev_appserver.py helloworld/

2009-02-17 Thread Barry Hunter

In command prompt or terminal window open to the folder that contains
google_appengine

(sorry dont know what the correct term for the 'terminal' on Mac is)

... or use AppEngine Launcher.

On 17/02/2009, nico-n  wrote:
>
>  Exactly where do I enter this command to start the Google Appengine
>  server? (I'm just starting with the helloworld app.
>
>  >
>


-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
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: clean urls?

2009-02-17 Thread Barry Hunter

the code can get access to the original url, so can extract the
parameters directly, eg using webapp

http://code.google.com/appengine/docs/python/tools/webapp/running.html#URL_Mappings




On 17/02/2009, John  wrote:
>
>  I'm trying to do the following:
>
>  In app.yaml:
>
>  - url: /product/id/([0-9]*)/
>   script: product.py?id=\1
>
>  but its not working, seems to ignore the query string. Is there any
>  way I can get this to work?
>
>  thanks
>
>  >
>


-- 
Barry

- www.nearby.org.uk - www.geograph.org.uk -

--~--~-~--~~~---~--~~
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] Forms and ReferenceProperty question

2009-02-17 Thread Savraj

I'm using webapp, it's totally awesome. One quick question.

So I have a model, ModelA, and one of the properties for ModelA is
"itemtype," a reference property that references an instance of
ModelB.

When I create a form to edit the properties of an instance of ModelA,
I get a dropdown box for "itemtype" that let's me choose the instance
of Model B. Awesome!!! Totally awesome, automatic behavior.

One problem though -- The instances of Model B are listed as
",, etc"

I know the fix is to override the form field for 'itemtype' in my
ModelAForm class -- but since webapp is doing some cool magic here I'm
not sure of the correct override.  Can someone help?

Thanks for your help!!!

-S
palo alto, ca
--~--~-~--~~~---~--~~
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] Problem (bug?) with urlfetch

2009-02-17 Thread Doug

Good Afternoon,

I have been working with urlfetch all day today and stumbled upon
something very interesting, the content attribute value changes when
you call it a second time.

Has anyone else found this? Is is something that I am doing?  Should
this be reported as a bug?

Doug

(BTW - Anyone wanting a simple soap client...here you go...)

Here is an example of my code:

from google.appengine.api import urlfetch
url = "http://127.0.0.1/Router.asmx";
payload = "http://www.w3.org/2001/XMLSchema-instance\"; xmlns:xsd=
\"http://www.w3.org/2001/XMLSchema\"; xmlns:soap=\"http://
schemas.xmlsoap.org/soap/envelope/\">string"
result = urlfetch.fetch(url, payload,
method=urlfetch.POST,
headers={'Content-Type': 'text/xml; charset=utf-8',
'SOAPAction':'\"http://integrationuri.org/route\";'})

print result.content
print ""
print result.headers
print ""
print result.status_code
print ""
print result
print result.content


Here is the output that is created:

{'content-length': '708', 'x-aspnet-version': '2.0.50727', 'cache-
control': 'private, max-age=0', 'date': 'Tue, 17 Feb 2009 23:07:29
GMT', 'p3p': 'CP="NOI LAW NID BUS CUSo PSAo PSDo TAIo OUR OTR COM DEM
NAV PRE"', 'content-type': 'text/xml; charset=utf-8'}

200


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>http://integrationuri.org/";>405FailureInput xml is invalid

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


Thank You! Mad Respect and Love to the app engine team.

-s

On Feb 17, 2:47 am, Jodok  Batlogg  wrote:
> awesome! thanks!
>
> jodok
>
> On Feb 13, 11:13 pm, "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: Forms and ReferenceProperty question


Answered my own question--

Add the following to ModelB:

def __unicode__(self):
   return self.modelBReadableName

(basically have the unicode method return the property with the
readable name of ModelB)...

-s

On Feb 17, 3:03 pm, Savraj  wrote:
> I'm using webapp, it's totally awesome. One quick question.
>
> So I have a model, ModelA, and one of the properties for ModelA is
> "itemtype," a reference property that references an instance of
> ModelB.
>
> When I create a form to edit the properties of an instance of ModelA,
> I get a dropdown box for "itemtype" that let's me choose the instance
> of Model B. Awesome!!! Totally awesome, automatic behavior.
>
> One problem though -- The instances of Model B are listed as
> ", 0x12321123>, etc"
>
> I know the fix is to override the form field for 'itemtype' in my
> ModelAForm class -- but since webapp is doing some cool magic here I'm
> not sure of the correct override.  Can someone help?
>
> Thanks for your help!!!
>
> -S
> palo alto, ca
--~--~-~--~~~---~--~~
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: Local Django Slow: Could not import "strop": Disallowed C-extension or built-in module...


This is on Mac OS X 10.5.6.  I didn't add any external imports, but
I'll go back over all of my imports anyway and see if something might
be triggering it.

On Jan 31, 4:41 am, Waldemar Kornewald  wrote:
> Hi,
>
> On Jan 29, 10:55 pm, boson  wrote:
>
> > Running Django + app-engine-patch locally... Frequently on requests
> > (can't determine why/when) I get these two log items:
>
> > DEBUG Could not import "strop": Disallowed C-extension or built-in
> > module
> > DEBUG Could not import "fcntl": Disallowed C-extension or built-in
> > module
>
> > Each one takes about half a second to come out.  This isn't a big
> > deal, but it is a little bit annoying.  Is there any way to tell it to
> > stop trying to import these modules, or speed it up somehow?
>
> Which OS do you have?
>
> I've never seen those debug messages. Do you possibly import something
> that uses those modules?
>
> Bye,
> Waldemar Kornewald
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: CPU accounting for Datastore writes and pricing feedback


I agree this is going to be an issue for applications that are not
read-heavy.  The more interactivity and state changing done by users
in your app, the more expensive it is going to be to host on GAE.

Googlers have hinted that they're working on getting the CPU-cost for
DS operations down, but it's likely to be shaving some % off more than
anything drastic.


On Feb 16, 9:01 pm, diomedes  wrote:
> 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

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




On Feb 16, 5:52 pm, Alexander Konovalenko  wrote:
> 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,

It probably does depend on your exact situation (like every other
engineering decision, which this one is).  But...

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

This is the easiest option, and, if you aren't too worried about being
able to roll back changes, or possible data corruption...

Just remember: what's deployed on production servers doesn't
necessarily match what's on the SDK.

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

This is the path I've taken, and it matches pretty well with the
"industry standard" for "enterprise" web-sites (whatever that means).
You can deploy your code to a server that will match your production
environment.  If it breaks, no real harm done.  If it works, you can
change the name (presumably you've already bumped the version) in
app.yaml and redeploy pretty much instantly.

Actually, this is one of the areas where GAE has a huge advantage over
pretty much every other option.

The downside, of course, is that you have to burn two apps instead of
just one.

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

If you're doing a bunch of big, complicated, nasty sites, and you
desperately need to keep their databases distinct for security
reasons, this is the way to go.  Personally, I suspect this is what
the "cloud" version of "enterprise" software looks like.

The down-side, of course, is that it's horribly complicated.

As one possible compromise between 2) and 3), I'm going to suggest a
[n] [honestly] horrendous hack which works for me.

I don't know how well this will work for any other web framework.  I
worked this one out using web2py (about which I have extremely mixed
feelings).

You have one single GAE app.  It dispatches to multiple "applications"
based on the URL.  The first directory in the URL defines the "web
site" it dispatches to.  The second determines which controller/view
it will be using.  The third decides which method/particular instance
of the controller/view it uses.  The rest specify positional
parameters to pass to the controller.

So:
http://myapp.appspot.com/init/default/welcome
would dispatch to the init site's default controller and call its
welcome method.

http://myapp.appspot.com/staging/default/welcome
would dispatch the same thing to the staging site.

Both sites share the same datastore, which makes this approach
dangerous.  Like I said, this is really a total trade-off/hack sort of
thing.  You can add hackery to your model names so one site fudges
Model type-names, but that edges you into complication issues about
keeping things straight.

The plus side of this approach is that, when you're ready to really
deploy, you can delete your existing init site, rename staging to
init, and upload your changes.  If you need to make emergency fixes
that you're absolutely confident about, just update init.  When you're
ready to start toying with a new major (for some value of "major"
release), make a copy of init named staging, merge in your changes
(you *are* using source control, right?), rinse, and repeat.

You could take this a step further and use the same Model versioning
magic suggested in 3).  Maybe that should be approach #5?

I don't know how this approach would work under django.  Every time I
try to wrap my head around that I have an allergic reaction.

I can't really endorse web2py (every time I dealt with it I just got
frustrated because I felt like it was doing too much).  But that could
just be me.  For anyone who's still on the fence, it's definitely
worth checking out.

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

That really can't be emphasized enough.  No matter what environment
you're in.

Speaking of which, I think I'll back up my source co

[google-appengine] RE: AE 1.1.7 defines has_key on db.Model



Google Groups doesn't give me any option to directly reply to this
post.  We'll see how this approach works.

When this error came up, I wrote a scathing flame.  And then I threw
it away, mainly because it just isn't productive.

Overriding the has_key() method seems like one of the least advisable
choices one can make in python.  If Guido has signed off on it, then
I'm not one to argue.  If anyone else decided to do this, without
Guido's explicit permission...I'm going to squawk, moan, and do funny
walks to draw attention to a decision that seems
incredibly...questionable, to me.

Like I said, I threw away my original flame, mainly because it wasn't
hurting me.  Now I seem to be running into exactly the same problem,
so I have to complain as well.

I've opened a "bug report", requested that this
get refactored, and just followed the advice to copy
google.appengine.ext.db.__init__.py to my own directory and am
currently referencing it from there.

As a software engineer, I *cringe* from that last part.  That's
google's
documented API.  It's written well enough that I feel fairly confident
hacking around it...but there isn't much telling how well it maps to
the production API (I'm guessing it's pretty close at present, but
will change radically in the future...just the nature of the beast).

Still, I thought I'd ping this thread to see if anyone else has an
opinion.

Regards,
James

-- Forwarded message --
From: "Daniel O'Brien (Google)" 
Date: Dec 1 2008, 5:17 pm
Subject: AE 1.1.7 defines has_key on db.Model
To: Google App Engine


It's worth filing this as a feature request (or defect) in the public
issue tracker, if you haven't already:http://code.google.com/p/
googleappengine/issues/list

As far as I know this method has existed since 1.1.6: Some developers
ran into issues involving cheetah, which assumes that anyhas_key
method behaves like that of a dict which, as you've noted, the one
nodb.Modeldoesn't.

Daniel

On Dec 1, 1:54 pm, Ken Tidwell  wrote:

> Apparently, some bright spark has defined ahas_keymethod ondb.Model.

> Doing so will preclude the creation of any Model derived from or
> emulating dictionary classes (such as UserDict or DictMixin).

> Thehas_keymethod in question does not follow the same semantics as
>has_keyon dict so the choice of name is unfortunate, to say the least.

> Any chance the method could be renamed to something less toxic and more
> suggestive of its actual function (such as key_complete)?

> ken

--~--~-~--~~~---~--~~
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: Timeout on get_by_key_name


I am consistently seeing get_by_key_name taking very long (1.4
seconds) on a small table (less than 1000 rows).

On Dec 21 2008, 10:58 am, Drew  wrote:
> Are you seeing timeouts withget_by_key_nameconsistently with a
> particular model, or randomly?
>
> On Dec 21, 2:56 am, Guy Rutenberg  wrote:
>
> > Hi,
>
> > I've a strange problem, I've a request that only callsget_by_key_name
> > (one time) and does no further work with the Datastore.
>
> > However, I'm getting a Timeout exception in this call. Is it normal?
> > Should I try to catch the exception and re-try theget_by_key_name?
>
> > I've thought thatget_by_key_nameshould be one of faster Datastore
> > operations, and I've no problems using it in other places.
>
> > Thanks,
>
> > Guy
--~--~-~--~~~---~--~~
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: get_by_key_name timeout!


I am consistently seeing get_by_key_name taking very long (1.4
seconds) on a small table (less than 1000 rows).


On Dec 20 2008, 4:10 pm, MajorProgamming  wrote:
> 12-19 06:34PM 51.839
> Traceback (most recent call last):
>   File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 498, in __call__
>     handler.get(*groups)
>   File "/base/data/home/apps/[edited out]/1.329827330674031168/
> helloworld.py", line 96, in get
>     curuser=CellPhones.get_by_key_name("n:"+number)
>   File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 837, inget_by_key_name
>     return get(*keys)
>   File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1032, in get
>     entities = datastore.Get(keys)
>   File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 217, in Get
>     raise _ToDatastoreError(err)
>   File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 1637, in _ToDatastoreError
>     raise errors[err.application_error](err.error_detail)
> Timeout
>
> I understand that I get timeouts for put() operations, but what's the
> explanation for this one?
--~--~-~--~~~---~--~~
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] get_by_key_name extremely slow


I am consistently seeing get_by_key_name taking very long (1.4
seconds) on a small table (less than 1000 rows). What could be the
reason?

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