[google-appengine] Re: 网页中有汉字 ,就会产生错误,不知是啥原因

2009-02-09 Thread Rolkey马海军

嘿嘿,不好意思,写的格式有点不一样,这样也可以?我试试看。

不过偶已经不是同学喽!

2009/2/3 Alexandra Zhang :
> 同学们都太激动了,水太大了. 其实前面kang回答了.
>
>
> On Feb 2, 6:59 pm, Rolkey马海军  wrote:
>> 有人捧场没人上台,有问题没解决可不爽,我已经自己找到解决方法了,就是在.py文件的最前面加上# -*- coding: utf-8
>> -*-即可!!这又是在GOOGLE里找到的
>>
>> 2009/2/2 Junkie o0o :
>>
>> > happy 牛 year!
>> > 哈哈
>>
>> > 2009/2/2 yu ping322 
>>
>> >> 在这里混的中国人挺多的,只是很多人的英语也很牛,说英语显摆。
>>
>> >> 2009/2/2 kang :
>> >> > 一直有中文的啊,新年快乐~
>>
>> >> > 2009/1/31 trydofor 
>>
>> >> >> 哥们们,
>>
>> >> >> 总算在列表里看到中文啦 :)
>> >> >> 兴奋啊,祝新年快乐,牛年牛B
>>
>> >> >> kang wrote:
>> >> >> > 在文件开始加上#coding=utf-8
>>
>> >> >> > 2009/1/22 网页中有汉字,就会产生错误,不知是啥原因 > >> >> > >
>>
>> >> >> > this code right in local development environment, but error on
>> >> >> > update
>> >> >> > to server.
>>
>> >> >> > import wsgiref.handlers
>> >> >> > from google.appengine.ext import webapp
>>
>> >> >> > class MainPage(webapp.RequestHandler):
>> >> >> >  def get(self):
>> >> >> >self.response.headers['Content-Type'] = 'text/html;
>> >> >> > charset=utf-8'
>> >> >> >self.response.out.write('Hello, have no thing,有
>> >> >> > 了汉字就不
>> >> >> > 灵了?')
>>
>> >> >> --
>> >> >> /\__/\___/\/\/\
>> >> >> _/\/\/\/\__/\__/\__/\/\/\/\_/\/\_/\__/\
>> >> >> __/\__/\_/\_/\__/\___/\_/\/\__/\___/\__/\/\/\__/\___/\__/\_/\__
>> >> >> _/\__/\__/\/\__/\/\__/\___/\__/\__/\___/\__/\__
>> >> >> /\/\/\/\/\/\/\_/\/\_/\/\___
>> >> >> _/\/\/\
>> >> >> _/ trydofor.com / a9text.sf.net / a9w3.sf.net /
>>
>> >> > --
>> >> > Stay hungry,Stay foolish.
> >
>

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



[google-appengine] Re: Allow dev_appserver to check for updates on startup? (Y/n)

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 12:03 pm, "c_greger...@mac.com" 
wrote:
> I am running on a mac:
> - GAE
> - Eclipse
> - PytDev
>
> Is it possible to not check for updates on startup? I get stuck in
> Eclipse with:
> INFO     2009-02-10 appengine_rpc.py] Server: appengine.google.com
> Allow dev_appserver to check for updates on startup? (Y/n):
>
> Thanks in advance!

Run dev_appserver.py once from command line and press 'n'.
--~--~-~--~~~---~--~~
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 do I "select * from entity where 'foreignkey' = blah"

2009-02-09 Thread Dan Sanderson
I'm not sure I understand your example.  The way you set it up here, select
* from Location where birthplace = whatever returns a set of Location
objects, each of which has a property with the key of a Person entity that
you're looking for.  You can access each Person object simply by referencing
location.name, e.g. location.name.name for the Person's StringProperty.  The
first time you reference the Person object for the property, the full entity
is fetched from the datastore.
Does that meet your needs?

-- Dan

On Mon, Feb 9, 2009 at 9:27 PM, adelevie  wrote:

>
> I know the datastore is not relational but this should still be
> simple.
>
> I have two models:
>
> class Person(db.Model):
> name = db.StringProperty()
>
> class Location(db.Model):
> birthplace = db.StringProperty()
> name = db.ReferenceProperty()
>
> So I want to be able to select all People given a birthplace. I tried
> messing with keys, but to no avail.
>
> thanks,
> Alan
>
> >
>

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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Dan Sanderson
Correct, all of the functionality and restrictions of the URL Fetch service
apply to the httplib interfaces.

-- Dan

On Mon, Feb 9, 2009 at 6:33 PM, gesteves  wrote:

>
> Quick question: The docs state that "You can use the Python standard
> libraries urllib, urllib2 or httplib to make HTTP requests. When
> running in App Engine, these libraries perform HTTP requests using App
> Engine's URL fetch service, which runs on Google's scalable HTTP
> request infrastructure."
>
> Does that mean that changing the user-agent header is still not
> allowed, even when using one of Python's standard libraries?
>
> >
>

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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread dobee

that's great news! especially the remote_api is great!
you rock guys :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread gesteves

Quick question: The docs state that "You can use the Python standard
libraries urllib, urllib2 or httplib to make HTTP requests. When
running in App Engine, these libraries perform HTTP requests using App
Engine's URL fetch service, which runs on Google's scalable HTTP
request infrastructure."

Does that mean that changing the user-agent header is still not
allowed, even when using one of Python's standard libraries?

--~--~-~--~~~---~--~~
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] Allow dev_appserver to check for updates on startup? (Y/n)

2009-02-09 Thread c_greger...@mac.com

I am running on a mac:
- GAE
- Eclipse
- PytDev

Is it possible to not check for updates on startup? I get stuck in
Eclipse with:
INFO 2009-02-10 appengine_rpc.py] Server: appengine.google.com
Allow dev_appserver to check for updates on startup? (Y/n):

Thanks in advance!


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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Piotr Jaroszyński

On Feb 10, 3:37 am, Barry Hunter  wrote:
> Looks exciting! But how do we try out the bulk client? The 'here' in
> the blog post, points to the same page :(

Should probably link to 
http://code.google.com/appengine/docs/python/tools/uploadingdata.html

--~--~-~--~~~---~--~~
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] Cannot access app engine via custom URL

2009-02-09 Thread romal...@gmail.com

I have completed all steps to modify the CNAME to access my
application engine with custom url

My Domain : ranaka.com
Custom URL for app engine : apps.ranaka.com

My hosting company sent me a screenshot to confirm that they have
completed create a CNAME for apps.ranaka.com

Can someone tell me what's the problem?

Sory for my poor english


--~--~-~--~~~---~--~~
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 do I "select * from entity where 'foreignkey' = blah"

2009-02-09 Thread adelevie

Thanks for the suggestion of reworking the models, but I'd really like
the way to do it given my models. I changed the names of the entities
and properties so as not to give away what I'm trying to do.

On Feb 10, 12:45 am, Bill  wrote:
> I don't understand why you are modeling it that way.  Why have the
> ReferenceProperty in Location?
>
> Given your case of wanting all people with a given birthplace, it
> seems like this makes sense:
>
> class Person(db.Model):
>     name = db.StringProperty()
>     birthplace = db.ReferenceProperty(Location, default="unknown",
> collection_name='born_here')
>
> class Location(db.Model):
>     place = db.StringProperty()
>
> Since a person is likely only born in one place, you put the reference
> with the Person.
> Now you can do:
>   birthplace = my_person.birthplace    # gets Location
> and
>   some_location.born_here   # list of Person born here
>
> On Feb 9, 9:27 pm, adelevie  wrote:
>
> > I know the datastore is not relational but this should still be
> > simple.
>
> > I have two models:
>
> > class Person(db.Model):
> >      name = db.StringProperty()
>
> > class Location(db.Model):
> >      birthplace = db.StringProperty()
> >      name = db.ReferenceProperty()
>
> > So I want to be able to select all People given a birthplace. I tried
> > messing with keys, but to no avail.
>
> > thanks,
> > Alan
--~--~-~--~~~---~--~~
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 do I "select * from entity where 'foreignkey' = blah"

2009-02-09 Thread Bill

I don't understand why you are modeling it that way.  Why have the
ReferenceProperty in Location?

Given your case of wanting all people with a given birthplace, it
seems like this makes sense:

class Person(db.Model):
name = db.StringProperty()
birthplace = db.ReferenceProperty(Location, default="unknown",
collection_name='born_here')

class Location(db.Model):
place = db.StringProperty()

Since a person is likely only born in one place, you put the reference
with the Person.
Now you can do:
  birthplace = my_person.birthplace# gets Location
and
  some_location.born_here   # list of Person born here


On Feb 9, 9:27 pm, adelevie  wrote:
> I know the datastore is not relational but this should still be
> simple.
>
> I have two models:
>
> class Person(db.Model):
>      name = db.StringProperty()
>
> class Location(db.Model):
>      birthplace = db.StringProperty()
>      name = db.ReferenceProperty()
>
> So I want to be able to select all People given a birthplace. I tried
> messing with keys, but to no avail.
>
> thanks,
> Alan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] How do I "select * from entity where 'foreignkey' = blah"

2009-02-09 Thread adelevie

I know the datastore is not relational but this should still be
simple.

I have two models:

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

class Location(db.Model):
 birthplace = db.StringProperty()
 name = db.ReferenceProperty()

So I want to be able to select all People given a birthplace. I tried
messing with keys, but to no avail.

thanks,
Alan

--~--~-~--~~~---~--~~
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: Giftag authentication

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 3:35 pm, "Brett C."  wrote:
> On Feb 3, 10:15 am, Bret  wrote:
>
> > How is Best Buy's Giftag using custom authentication?
>
> >http://www.giftag.com
>
> By rolling their own solution. Nothing says you have to use App
> Engine's included support for Google (Apps) user authentication.

You can use django.contrib.auth [1] with app-engine-patch [2]

[1] http://docs.djangoproject.com/en/dev/topics/auth/
[2] http://code.google.com/p/app-engine-patch/
--~--~-~--~~~---~--~~
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: Giftag authentication

2009-02-09 Thread Brett C.



On Feb 3, 10:15 am, Bret  wrote:
> How is Best Buy's Giftag using custom authentication?
>
> http://www.giftag.com

By rolling their own solution. Nothing says you have to use App
Engine's included support for Google (Apps) user authentication.
--~--~-~--~~~---~--~~
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: python problems - HTTPSHandler

2009-02-09 Thread Brett C.



On Feb 9, 1:29 am, Haiming  wrote:
> I encountered similar problem on Ubuntu Linux:
>
> $ dev_appserver.py evaluation/
> Traceback (most recent call last):
>   File "/usr/local/google/laihaiming/google_appengine/
> dev_appserver.py", line 55, in 
>     execfile(script_path, globals())
>   File "/usr/local/google/laihaiming/google_appengine/google/appengine/
> tools/dev_appserver_main.py", line 358, in 
>     sys.exit(main(sys.argv))
>   File "/usr/local/google/laihaiming/google_appengine/google/appengine/
> tools/dev_appserver_main.py", line 316, in main
>     server = MakeRpcServer(option_dict)
>   File "/usr/local/google/laihaiming/google_appengine/google/appengine/
> tools/dev_appserver_main.py", line 277, in MakeRpcServer
>     host_override=option_dict[ARG_ADMIN_CONSOLE_HOST])
>   File "/usr/local/google/laihaiming/google_appengine/google/appengine/
> tools/appcfg.py", line 125, in __init__
>     self.opener = self._GetOpener()
>   File "/usr/local/google/laihaiming/google_appengine/google/appengine/
> tools/appcfg.py", line 338, in _GetOpener
>     opener.add_handler(urllib2.HTTPSHandler())
> AttributeError: 'module' object has no attribute 'HTTPSHandler'
>
> My python version is 2.5.4. Does anyone know the cause ?
>

Check if the ssl module is built. If you can't import ssl then that's
the problem and you need to follow the instructions others have
pointed out in this thread on how to use apt-get to download the
module.
--~--~-~--~~~---~--~~
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: using kid with GAE

2009-02-09 Thread Brett C.



On Feb 9, 10:26 am, jmt  wrote:
> Does anyone know if the kid template module is a supported template
> engine on Google App Engine?
>
> I am very new to the kid module and just wanted to give it a shot as a
> Google App Engine project and I receive the following when running my
> sample code thru dev_appserver.py :
>
> 63 class KidFile(object):
>    64     magic = imp.get_magic()
>    65
>    66     def __init__(self, kid_file, force=False,
> magic undefined, global imp = None, imp.get_magic undefined
>
> : 'module' object has no attribute
> 'get_magic'
>
> I basically get this during the kid module import.
>
> Sorry if this has already been covered, in general I am new to GAE as
> well.

The error is coming from the sandbox blocking the imp module and thus
the get_magic function from that module. This has been fixed in v1.1.9
of the SDK. But if Kid compiles down to Python bytecode it probably
won't work as the sandbox blocks bytecode usage.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread cz

This is really great! I just want you (google engineers) how much I
appreciate your work on this. GAE is a really fun platform to use.
Despite all the whining (a lot from me) it's turning into a great
product, plus the fact that it's free (well, for smaller apps) is
amazing.

Well, ok, one more whine: Django 1.0? or maybe a faster zipimport? or
lift the 1000 file limit? or increase app cache time-to-live? it's
just that low traffic sites like mine get hosed by zipimport-ing and
patching Django on startup...
Sorry about that. I like using GAE so much I want it to be perfect.

On Feb 9, 7:12 pm, Bill  wrote:
> Buried in the change log is an innocuous line about the remote API.
> From the module:
> "This allows easy remote access to the App Engine datastore, and
> potentially any
> of the other App Engine APIs, using the same interface you use when
> accessing
> the service locally."
>
> On Feb 9, 6:12 pm, Jeff S  wrote:
>
> > Today we released version 1.1.9 of our SDK. Here's what's new in this
> > release:
>
> >       * You can now use the Python standard libraries urllib, urllib2
> > or httplib to make HTTP requests. This has been a frequent request on
> > our issue tracker.
> >       * We've been working on a set of tools that will make the
> > process of uploading and downloading data from App Engine applications
> > easier. Today we're excited to announce an early release of our new
> > bulk uploading client. You can try it out here. Let us know what you
> > think in our Google Group!
> >       * Several updates to our datastore, including the automatic
> > generation of single property indexes and the addition of IN and !=
> > operators to db.Query. See the Datastore API docs for more details.
> >       * A bunch of additional bugfixes and enhancements, listed in our
> > Release Notes.
>
> > See the blog 
> > post:http://googleappengine.blogspot.com/2009/02/sdk-version-119-released
>
> > and the downloads are available 
> > here:http://code.google.com/appengine/downloads.html
>
> > Happy coding,
>
> > Jeff
--~--~-~--~~~---~--~~
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] Random 'google.appengine.runtime.DeadlineExceededError'

2009-02-09 Thread phtq

In recent days some requests have returned the above error. If the
request is repeated a little while later it processes normally. We
would like to put some users onto our application but can't do so
until this problem is resolved.

An example of a normal log entry for one of the operations is shown
below:


I 02-09 07:49PM 16.605 returnfile=/keyboards/keysounds/godk.mp3
See details

02-09 07:49PM 16.576 /keyboards/keysounds/godk.mp3 200 75ms 165ms-cpu
9kb
See details
203.58.113.131 - - [09/Feb/2009:19:49:16 -0800] "GET /keyboards/
keysounds/godk.mp3 HTTP/1.1" 200 9936 "http://kbdlessons.appspot.com/
TQP-PIT/Language/UK-PIT/Course/BasicKeyboard/WorkSpace/Lesson1b/bin/
Lesson1b.swf" -I 02-09 07:49PM 16.605
returnfile=/keyboards/keysounds/godk.mp3


A log entry for the same request (but failing) is shown below:



E 02-09 07:11PM 04.417 : Traceback (most
recent call last): File "/base/data/home/apps/kbdlessons/
1-01.33130907911
See details

02-09 07:10PM 55.037 /keyboards/keysounds/godk.mp3 500 9391ms 1260ms-
cpu 0kb
See details
203.58.113.131 - - [09/Feb/2009:19:11:04 -0800] "GET /keyboards/
keysounds/godk.mp3 HTTP/1.1" 500 0 "http://kbdlessons.appspot.com/TQP-
PIT/Language/UK-PIT/Course/BasicKeyboard/WorkSpace/Lesson1b/bin/
Lesson1b.swf" -E 02-09 07:11PM 04.417
:
Traceback (most recent call last):
  File "/base/data/home/apps/kbdlessons/1-01.331309079110687966/
main.py", line 61, in 
main()
  File "/base/data/home/apps/kbdlessons/1-01.331309079110687966/
main.py", line 57, in main
util.run_wsgi_app(application)
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
util.py", line 76, in run_wsgi_app
result = application(env, _start_response)
  File "/base/python_lib/versions/1/django/core/handlers/wsgi.py",
line 189, in __call__
response = self.get_response(request)
  File "/base/python_lib/versions/1/django/core/handlers/base.py",
line 115, in get_response
receivers = dispatcher.send(signal=signals.got_request_exception)
  File "/base/python_lib/versions/1/django/dispatch/dispatcher.py",
line 360, in send
**named
  File "/base/python_lib/versions/1/django/dispatch/robustapply.py",
line 47, in robustApply
return receiver(*arguments, **named)
  File "/base/data/home/apps/kbdlessons/1-01.331309079110687966/
main.py", line 40, in log_exception
logging.exception("Exception in request:")
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
1301, in exception
apply(error, (msg,)+args, {'exc_info': 1})
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
1294, in error
apply(root.error, (msg,)+args, kwargs)
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
1015, in error
apply(self._log, (ERROR, msg, args), kwargs)
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
1101, in _log
self.handle(record)
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
, in handle
self.callHandlers(record)
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
1148, in callHandlers
hdlr.handle(record)
  File "/base/python_dist/lib/python2.5/logging/__init__.py", line
655, in handle
self.emit(record)
  File "/base/python_lib/versions/1/google/appengine/api/
app_logging.py", line 71, in emit
self.stream.write(message.encode("UTF-8"))
  File "/base/python_dist/lib/python2.5/encodings/__init__.py", line
96, in search_function
globals(), locals(), _import_tail)


No changes were made to the application between the 2 requests
(although other requests might well have been processed between the
2).

This particular operation just does one gql operation to find the
entity which has the mp3 file being requested (the file is held as a
Blob in the entity) and then hands it back.

The code follows:

def returnfile(request):
  response = HttpResponse()
  ref = request.get_full_path()
  logging.info('returnfile='+ref)
  x = FileStore.gql('where Reference = :1', ref).get()
  if x == None:
return HttpResponse("OK")
  response.headers['Content-Type'] = x.Type
  response.write(x.Data)
  return response

--~--~-~--~~~---~--~~
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: GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread Dan Sanderson
We have some things in the works to help with the CPU hassles, so I won't
comment directly on the feasibility of zipimporting frameworks.  But I will
confirm your excellent observations regarding the caching behavior: App
caching on a single app server expires least recently used apps, and
sometimes traffic spikes are handled by spinning up the app on new app
servers.

As for bundling Django, we plan to upgrade the bundled Django with the next
major version of the Python runtime environment.  Upgrading Django 0.96 to
1.0 in place does not meet our criteria for a backwards compatible change,
and so cannot happen without a major version bump.

-- Dan

On Mon, Feb 9, 2009 at 1:41 PM, cz  wrote:

>
> I have noticed that the app cache does not keep things around for much
> more than a few seconds, so if your site gets relatively little
> traffic it will have more problems than if it gets heavier traffic
> (paradoxically). Also, if your app returns pages with many images or
> other embedded content that it also served by GAE then when the
> browser does a multithreaded set of requests GAE then forks off more
> processes to handle these which in turn also reload your app. (At
> least this is what I've gathered looking at the logs and the number
> and timing of zipimport invocations).
> Basically, using a large framework with GAE like Django 1.0 (when it's
> imported at startup via zipimport) is sort of unusable right now if
> your site gets light traffic and does some non-trivial stuff on the
> server side.
>
> I understand the hesitancy to bundle a particular framework with GAE,
> but the GAE api, the webapp framework, and the bundled Django .96, all
> seems to indicate that Django was a major influence and I suspect many
> if not most of the applications use Django. It would make sense to
> bundle an up to date version of Django just as a default framework,
> non-Django users can always use whatever framework they want. And I
> don't buy the argument that upgrading the Django .96 release will
> cause a lot of grief, it really is not that hard to upgrade an
> application to use a more recent version.
>
> On Feb 9, 12:32 pm, johnP  wrote:
> > Another question:  where does one start to troubleshoot if caching
> > seems to fail.  In my case (using appengine patch) - the app.yaml
> > handler points to a script:  common/appenginepatch/main.py  This
> > module *does* define a main() script.
> >
> > I placed logging.debug calls at the top of 5 common modules.  When I
> > click through 5 different views (each defined in the different
> > modules) 5 times in quick succession, I see one instance of the
> > logging.debug evaluating for each of these modules in the logs.  So
> > this tells me that something is caching, at least for this brief
> > period of time.
> >
> > But the interesting thing is if I wait 30 seconds or a minute.  Then I
> > repeat the process (clicking through the 5 views in quick succession,
> > 5 times - for a total of 25 clicks).  I see that the logging.debug
> > evaluates once again for each module - while the remaining 4 clicks
> > don't reevaluate.  So it's like the interpreter goes cold in 30
> > seconds.
> >
> > If it is caching for 20 seconds, shouldn't it cache for a minute?  How
> > long should the cache last for?  Any suggestions where to look
> > further?
> >
> > On Feb 9, 11:53 am, Andy Freeman  wrote:
> >
> > > > Lazy importing (putting the import
> >
> > > statements directly in the code paths, instead of on module start-up)
> > > can
> > > help reduce the cost of that first per-server request, though that's
> > > not
> > > always easy to do when using a framework.
> >
> > > Hold it.  I thought that the first instance was special in that it got
> > > extra CPU quota.  (I don't remember if the "first instance" that gets
> > > extra CPU is the first invocation of a given handler in a process or
> > > the first handler used by a new process.)
> >
> > > If the "first instance" does get extra CPU, lazy import is a bad
> > > idea.  Instead, the first instance should use that extra CPU to do
> > > things, such as import, that subsequent instances will/might need.
> >
> > > On Feb 9, 11:03 am, Dan Sanderson  wrote:
> >
> > > > I can answer of couple of these:
> >
> > > > On Mon, Feb 9, 2009 at 9:29 AM, Mike Wesner 
> wrote:
> > > > > 1. How does the import cache work exactly?  I have read docs but
> still
> > > > > am left with questions on how exactly it works.  If we have a
> main.py
> > > > > with our main() method in it... are all the imports in that file
> > > > > cached? Is there a way to keep our custom django in memory?
> >
> > > > All imports are cached on a per app server basis.  The first time the
> app
> > > > imports a module on an app server, the module is loaded from disk and
> > > > evaluated.  Subsequent imports of that module on that app server do
> not load
> > > > or evaluate any code, in the same sense as if you imported a module
> more
> > > > than once in a single run of a 

[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Bill

Buried in the change log is an innocuous line about the remote API.
>From the module:
"This allows easy remote access to the App Engine datastore, and
potentially any
of the other App Engine APIs, using the same interface you use when
accessing
the service locally."

On Feb 9, 6:12 pm, Jeff S  wrote:
> Today we released version 1.1.9 of our SDK. Here's what's new in this
> release:
>
>       * You can now use the Python standard libraries urllib, urllib2
> or httplib to make HTTP requests. This has been a frequent request on
> our issue tracker.
>       * We've been working on a set of tools that will make the
> process of uploading and downloading data from App Engine applications
> easier. Today we're excited to announce an early release of our new
> bulk uploading client. You can try it out here. Let us know what you
> think in our Google Group!
>       * Several updates to our datastore, including the automatic
> generation of single property indexes and the addition of IN and !=
> operators to db.Query. See the Datastore API docs for more details.
>       * A bunch of additional bugfixes and enhancements, listed in our
> Release Notes.
>
> See the blog 
> post:http://googleappengine.blogspot.com/2009/02/sdk-version-119-released
>
> and the downloads are available 
> here:http://code.google.com/appengine/downloads.html
>
> Happy coding,
>
> Jeff
--~--~-~--~~~---~--~~
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: Downloading app

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 1:47 pm, kev  wrote:
> Hello,
> I accidentally deleted my app from my mac and cannot retrieve it. Is
> there a way i can download the app from app engine?
>
Also, star this issue:
http://code.google.com/p/googleappengine/issues/detail?id=1047

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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Damien Hou
Allowing urllib, urllib2 and httplib is a big improvement for reusing code!
Kudos to the GAE team! I'm now eagerly looking forward to those line items
on the new 6 month roadmap (groc/cron, offline queues, email processing and
xmpp)!


On Tue, Feb 10, 2009 at 10:12 AM, Jeff S  wrote:

>
> Today we released version 1.1.9 of our SDK. Here's what's new in this
> release:
>
>  * You can now use the Python standard libraries urllib, urllib2
> or httplib to make HTTP requests. This has been a frequent request on
> our issue tracker.
>  * We've been working on a set of tools that will make the
> process of uploading and downloading data from App Engine applications
> easier. Today we're excited to announce an early release of our new
> bulk uploading client. You can try it out here. Let us know what you
> think in our Google Group!
>  * Several updates to our datastore, including the automatic
> generation of single property indexes and the addition of IN and !=
> operators to db.Query. See the Datastore API docs for more details.
>  * A bunch of additional bugfixes and enhancements, listed in our
> Release Notes.
>
> See the blog post:
> http://googleappengine.blogspot.com/2009/02/sdk-version-119-released.html
>
> and the downloads are available here:
> http://code.google.com/appengine/downloads.html
>
> Happy coding,
>
> Jeff
> >
>


-- 
Best Regards,
Damien

--~--~-~--~~~---~--~~
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: Downloading app

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 1:47 pm, kev  wrote:
> Hello,
> I accidentally deleted my app from my mac and cannot retrieve it. Is
> there a way i can download the app from app engine?
>
See the first question on the App Engine Community FAQ:
http://tr.im/fhvj

--~--~-~--~~~---~--~~
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: Roadmap update and XMMP

2009-02-09 Thread Dan Sanderson
We have no such plans to announce at this time.  Feel free to make and star
an issue for it.
-- Dan

On Mon, Feb 9, 2009 at 4:43 PM, Onestone  wrote:

>
> Dan, are there any plans to eventually support client-side BOSH
> (a.k.a. HTTP-binding for XMPP)? Server-side XMPP support is not very
> useful, but client-side BOSH support would be great.
>
> On Feb 9, 7:56 pm, Dan Sanderson  wrote:
> > XMPP support will not take the form of long running processes.  XMPP
> > connections will be maintained by servers that relay incoming messages to
> > the app's XMPP handlers, each of which will execute just like an HTTP
> > request handler.  There will also be an API for sending XMPP messages
> from
> > the app, among other things.
> > -- Dan
> >
> > On Sat, Feb 7, 2009 at 7:24 AM, Roberto Saccon 
> wrote:
> >
> > > Uuhh, typo, I mean XMPP, see
> > >http://code.google.com/intl/und/appengine/docs/roadmap.html
> >
> > > On Feb 7, 12:20 pm, Roberto Saccon  wrote:
> > > > Now we know it, XMMP comes to appengine. So far, appengine has been
> > > > limited to shortlived-HTTP requests.  What are the educated guesses
> > > > (or somebody who knows it, is allowed to speak out loud here ...),
> > > > will XMMP bring streaming HTTP request with possibly longer lifetime
> > > > than 10 sec to appengine (but also higher cost, like HTTPS), so we
> can
> > > > do long-polling or other serverpush hacks ? Or none of this, it will
> > > > run on the same platform and just normal polling will be
> > > > "encouraged" ?
> >
> > > > Roberto
> >
>

--~--~-~--~~~---~--~~
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] Downloading app

2009-02-09 Thread kev

Hello,
I accidentally deleted my app from my mac and cannot retrieve it. Is
there a way i can download the app from app engine?

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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Dan Sanderson
On Mon, Feb 9, 2009 at 6:37 PM, Barry Hunter 
 wrote:

>
> Looks exciting! But how do we try out the bulk client? The 'here' in
> the blog post, points to the same page :(
>

The bulk loader docs are here:
http://code.google.com/appengine/docs/python/tools/uploadingdata.html

-- Dan


2009/2/10 Jeff S :
> >
> > Today we released version 1.1.9 of our SDK. Here's what's new in this
> > release:
> >
> >  * You can now use the Python standard libraries urllib, urllib2
> > or httplib to make HTTP requests. This has been a frequent request on
> > our issue tracker.
> >  * We've been working on a set of tools that will make the
> > process of uploading and downloading data from App Engine applications
> > easier. Today we're excited to announce an early release of our new
> > bulk uploading client. You can try it out here. Let us know what you
> > think in our Google Group!
> >  * Several updates to our datastore, including the automatic
> > generation of single property indexes and the addition of IN and !=
> > operators to db.Query. See the Datastore API docs for more details.
> >  * A bunch of additional bugfixes and enhancements, listed in our
> > Release Notes.
> >
> > See the blog post:
> http://googleappengine.blogspot.com/2009/02/sdk-version-119-released.html
> >
> > and the downloads are available here:
> http://code.google.com/appengine/downloads.html
> >
> > Happy coding,
> >
> > Jeff
> > >
> >
>
> >
>

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



[google-appengine] Re: SDK version 1.1.9 Released

2009-02-09 Thread Barry Hunter

Looks exciting! But how do we try out the bulk client? The 'here' in
the blog post, points to the same page :(



2009/2/10 Jeff S :
>
> Today we released version 1.1.9 of our SDK. Here's what's new in this
> release:
>
>  * You can now use the Python standard libraries urllib, urllib2
> or httplib to make HTTP requests. This has been a frequent request on
> our issue tracker.
>  * We've been working on a set of tools that will make the
> process of uploading and downloading data from App Engine applications
> easier. Today we're excited to announce an early release of our new
> bulk uploading client. You can try it out here. Let us know what you
> think in our Google Group!
>  * Several updates to our datastore, including the automatic
> generation of single property indexes and the addition of IN and !=
> operators to db.Query. See the Datastore API docs for more details.
>  * A bunch of additional bugfixes and enhancements, listed in our
> Release Notes.
>
> See the blog post: 
> http://googleappengine.blogspot.com/2009/02/sdk-version-119-released.html
>
> and the downloads are available here: 
> http://code.google.com/appengine/downloads.html
>
> Happy coding,
>
> Jeff
> >
>

--~--~-~--~~~---~--~~
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] SDK version 1.1.9 Released

2009-02-09 Thread Jeff S

Today we released version 1.1.9 of our SDK. Here's what's new in this
release:

  * You can now use the Python standard libraries urllib, urllib2
or httplib to make HTTP requests. This has been a frequent request on
our issue tracker.
  * We've been working on a set of tools that will make the
process of uploading and downloading data from App Engine applications
easier. Today we're excited to announce an early release of our new
bulk uploading client. You can try it out here. Let us know what you
think in our Google Group!
  * Several updates to our datastore, including the automatic
generation of single property indexes and the addition of IN and !=
operators to db.Query. See the Datastore API docs for more details.
  * A bunch of additional bugfixes and enhancements, listed in our
Release Notes.

See the blog post: 
http://googleappengine.blogspot.com/2009/02/sdk-version-119-released.html

and the downloads are available here: 
http://code.google.com/appengine/downloads.html

Happy coding,

Jeff
--~--~-~--~~~---~--~~
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: math/trig functions in GQL

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 11:50 am, Shawn  wrote:
> Ok, thanks for the info. Are there any good references on GQL other
> than the docs provided on the Google Code site for App Engine?
>
The most complete reference you can find is there:
http://code.google.com/appengine/docs/python/datastore/gqlreference.html

--~--~-~--~~~---~--~~
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: math/trig functions in GQL

2009-02-09 Thread Shawn

Ok, thanks for the info. Are there any good references on GQL other
than the docs provided on the Google Code site for App Engine?

Shawn

On Feb 9, 4:08 pm, Alexander Kojevnikov 
wrote:
> On Feb 10, 8:50 am, Shawn  wrote:
>
> > Is there a list of SQL-supported math (specifically trig) functions
> > published somewhere?
>
> GQL doesn't support any, you have to do the calculations in your
> Python code.
--~--~-~--~~~---~--~~
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 - How i do expose class method to http Requests?

2009-02-09 Thread djidjadji

Work your way through this example, it will make it clear.

http://code.google.com/appengine/docs/python/gettingstarted/

--~--~-~--~~~---~--~~
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: RuntimeWarning: Custom _query_class specified without corresponding custom _query_multi_class. Things will break if you use queries with the "IN" or "!=" operators.

2009-02-09 Thread Jack

BTW, the new SDK has just hit http://code.google.com/appengine/downloads.html
.

On Feb 10, 11:07 am, Jack  wrote:
> The warning won't break anything. It's caused by some internal changes
> in preparation for the next SDK release. Once the new SDK comes out,
> you'll be able to fix your SearchableModel extensions to make the
> warning go away.
>
> On Feb 7, 11:42 pm, Tom  wrote:
>
> > Perhaps associated with my use of 
> > SearchableModel?http://code.google.com/p/googleappengine/source/browse/trunk/google/a...
>
> > I have my own version of SearchableModel but its differences with the
> > trunk are only in how the words are added for searching
> > (unicodedata.normalize).
>
> > On Feb 7, 7:25 am, Tom  wrote:
>
> > > My app started throwing these error messages into the log yesterday
> > > (no change to the app on my part).  Any ideas on the cause?
>
> > > 02-06 10:08PM 16.942 /android/bottle/search/ 200 145ms 744ms-cpu 0kb
> > > 208.54.83.57 - - [06/Feb/2009:22:08:17 -0800] "POST /android/bottle/
> > > search/ HTTP/1.1" 200 184 - -
> > > E 02-06 10:08PM 17.085
> > > /base/python_lib/versions/1/google/appengine/ext/db/__init__.py:1558:
> > > RuntimeWarning: Custom _query_class specified without corresponding
> > > custom _query_multi_class. Things will break if you use queries with
> > > the "IN" or "!=" operators.
> > > E 02-06 10:08PM 17.085
> > >   ' the "IN" or "!=" operators.', RuntimeWarning)
--~--~-~--~~~---~--~~
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: Roadmap update and XMMP

2009-02-09 Thread Onestone

Dan, are there any plans to eventually support client-side BOSH
(a.k.a. HTTP-binding for XMPP)? Server-side XMPP support is not very
useful, but client-side BOSH support would be great.

On Feb 9, 7:56 pm, Dan Sanderson  wrote:
> XMPP support will not take the form of long running processes.  XMPP
> connections will be maintained by servers that relay incoming messages to
> the app's XMPP handlers, each of which will execute just like an HTTP
> request handler.  There will also be an API for sending XMPP messages from
> the app, among other things.
> -- Dan
>
> On Sat, Feb 7, 2009 at 7:24 AM, Roberto Saccon  wrote:
>
> > Uuhh, typo, I mean XMPP, see
> >http://code.google.com/intl/und/appengine/docs/roadmap.html
>
> > On Feb 7, 12:20 pm, Roberto Saccon  wrote:
> > > Now we know it, XMMP comes to appengine. So far, appengine has been
> > > limited to shortlived-HTTP requests.  What are the educated guesses
> > > (or somebody who knows it, is allowed to speak out loud here ...),
> > > will XMMP bring streaming HTTP request with possibly longer lifetime
> > > than 10 sec to appengine (but also higher cost, like HTTPS), so we can
> > > do long-polling or other serverpush hacks ? Or none of this, it will
> > > run on the same platform and just normal polling will be
> > > "encouraged" ?
>
> > > Roberto
--~--~-~--~~~---~--~~
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: math/trig functions in GQL

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 8:50 am, Shawn  wrote:
> Is there a list of SQL-supported math (specifically trig) functions
> published somewhere?

GQL doesn't support any, you have to do the calculations in your
Python code.
--~--~-~--~~~---~--~~
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: RuntimeWarning: Custom _query_class specified without corresponding custom _query_multi_class. Things will break if you use queries with the "IN" or "!=" operators.

2009-02-09 Thread Jack

The warning won't break anything. It's caused by some internal changes
in preparation for the next SDK release. Once the new SDK comes out,
you'll be able to fix your SearchableModel extensions to make the
warning go away.

On Feb 7, 11:42 pm, Tom  wrote:
> Perhaps associated with my use of 
> SearchableModel?http://code.google.com/p/googleappengine/source/browse/trunk/google/a...
>
> I have my own version of SearchableModel but its differences with the
> trunk are only in how the words are added for searching
> (unicodedata.normalize).
>
> On Feb 7, 7:25 am, Tom  wrote:
>
> > My app started throwing these error messages into the log yesterday
> > (no change to the app on my part).  Any ideas on the cause?
>
> > 02-06 10:08PM 16.942 /android/bottle/search/ 200 145ms 744ms-cpu 0kb
> > 208.54.83.57 - - [06/Feb/2009:22:08:17 -0800] "POST /android/bottle/
> > search/ HTTP/1.1" 200 184 - -
> > E 02-06 10:08PM 17.085
> > /base/python_lib/versions/1/google/appengine/ext/db/__init__.py:1558:
> > RuntimeWarning: Custom _query_class specified without corresponding
> > custom _query_multi_class. Things will break if you use queries with
> > the "IN" or "!=" operators.
> > E 02-06 10:08PM 17.085
> >   ' the "IN" or "!=" operators.', RuntimeWarning)
--~--~-~--~~~---~--~~
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: QueryIterator Error

2009-02-09 Thread Jack


The internals of the Query class have been recently changed. Are you
retrieving Query objects from somewhere (memcache perhaps?) instead of
constructing them when needed?

Memcaching Query objects isn't generally a good idea. You probably
want to cache the results instead. See e.g.,
http://groups.google.com/group/google-appengine/browse_thread/thread/2a555b8c33cbbd62/b9d6511a2eafa581

On Feb 10, 4:30 am, Marzia Niccolai  wrote:
> Hi,
>
> Can you please post the code to the handler where you are seeing this issue.
>
> -Marzia
>
> On Sun, Feb 8, 2009 at 7:30 AM, Davide Ferrero  wrote:
>
> > From 2 two days my applications fall in error in every pages. I don't
> > have modified nothing from 1 week and three days ago my application
> > works correctly.. this is the error log:
>
> > #
> >      02-08 07:24AM 44.966 / 500 194ms 139ms-cpu 0kb
> >      See details
> >      79.50.168.248 - - [08/Feb/2009:07:24:45 -0800] "GET / HTTP/1.1"
> > 500 104 - -
> >      E 02-08 07:24AM 45.081
>
> >      'Query' object has no attribute '_Query__query_sets'
> >      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/sbook/1.331254528912766865/
> > main.py", line 89, in get
> >          tags=Cloud.tagCloud()
> >        File "/base/data/home/apps/sbook/1.331254528912766865/
> > main.py", line 173, in tagCloud
> >          for q in q1:
> >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 1336, in __iter__
> >          return self.run()
> >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 1328, in run
> >          return _QueryIterator(self._model_class, iter(self._get_query
> > ().Run()))
> >        File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 1547, in _get_query
> >          for query_set in self.__query_sets:
> >      AttributeError: 'Query' object has no attribute
> > '_Query__query_sets'
>
> > 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] Entity Groups

2009-02-09 Thread Ian Lewis
Hi all,

The documentation seemed to suggest that the more root entities you have the
more it can distribute your query so it should be faster, but I'm curious
about entity groups and what, if any, advantage there is to putting entities
in an entity group besides being able to use them in a transaction. Is there
any?

Ian

--~--~-~--~~~---~--~~
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: Download code

2009-02-09 Thread niklasr

I include http://appfilesbrowser.googlecode.com/files/GAEAppFileBrowser.rar
and download deployed source to local. Datastore backup solution seems
to be approcket.
regards
Niklas
--~--~-~--~~~---~--~~
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: Download code

2009-02-09 Thread luismgz

You can't.
But in future projects, you can add a script to do it to some extent
(it doesn't work with static files AFAIK).
Check this out: 
http://www.manatlan.com/blog/zipme___download_sources_of_your_gae_website__as_a_zip_file

Luis

On 9 feb, 15:19, Kaiser  wrote:
> Anybody knows how can I download all the files of a project from GAE?
> Is it possible?
--~--~-~--~~~---~--~~
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] calculated properties

2009-02-09 Thread Jason DeFontes

Is there a simple way to have a calculated property that automatically
updates itself any time an entity is saved? For example:

class Article(db.Model):
  body = db.StringProperty()
  word_count = db.IntegerProperty()

I'd like to put some code in the Article class such that word_count is
automatically updated any time body is modified.


--~--~-~--~~~---~--~~
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] math/trig functions in GQL

2009-02-09 Thread Shawn

Is there a list of SQL-supported math (specifically trig) functions
published somewhere?

--~--~-~--~~~---~--~~
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: Download code

2009-02-09 Thread Alexander Kojevnikov

On Feb 10, 5:19 am, Kaiser  wrote:
> Anybody knows how can I download all the files of a project from GAE?
> Is it possible?

See the first question on the App Engine Community FAQ:
http://tr.im/fhvj

--~--~-~--~~~---~--~~
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: GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread cz

I have noticed that the app cache does not keep things around for much
more than a few seconds, so if your site gets relatively little
traffic it will have more problems than if it gets heavier traffic
(paradoxically). Also, if your app returns pages with many images or
other embedded content that it also served by GAE then when the
browser does a multithreaded set of requests GAE then forks off more
processes to handle these which in turn also reload your app. (At
least this is what I've gathered looking at the logs and the number
and timing of zipimport invocations).
Basically, using a large framework with GAE like Django 1.0 (when it's
imported at startup via zipimport) is sort of unusable right now if
your site gets light traffic and does some non-trivial stuff on the
server side.

I understand the hesitancy to bundle a particular framework with GAE,
but the GAE api, the webapp framework, and the bundled Django .96, all
seems to indicate that Django was a major influence and I suspect many
if not most of the applications use Django. It would make sense to
bundle an up to date version of Django just as a default framework,
non-Django users can always use whatever framework they want. And I
don't buy the argument that upgrading the Django .96 release will
cause a lot of grief, it really is not that hard to upgrade an
application to use a more recent version.

On Feb 9, 12:32 pm, johnP  wrote:
> Another question:  where does one start to troubleshoot if caching
> seems to fail.  In my case (using appengine patch) - the app.yaml
> handler points to a script:  common/appenginepatch/main.py  This
> module *does* define a main() script.
>
> I placed logging.debug calls at the top of 5 common modules.  When I
> click through 5 different views (each defined in the different
> modules) 5 times in quick succession, I see one instance of the
> logging.debug evaluating for each of these modules in the logs.  So
> this tells me that something is caching, at least for this brief
> period of time.
>
> But the interesting thing is if I wait 30 seconds or a minute.  Then I
> repeat the process (clicking through the 5 views in quick succession,
> 5 times - for a total of 25 clicks).  I see that the logging.debug
> evaluates once again for each module - while the remaining 4 clicks
> don't reevaluate.  So it's like the interpreter goes cold in 30
> seconds.
>
> If it is caching for 20 seconds, shouldn't it cache for a minute?  How
> long should the cache last for?  Any suggestions where to look
> further?
>
> On Feb 9, 11:53 am, Andy Freeman  wrote:
>
> > > Lazy importing (putting the import
>
> > statements directly in the code paths, instead of on module start-up)
> > can
> > help reduce the cost of that first per-server request, though that's
> > not
> > always easy to do when using a framework.
>
> > Hold it.  I thought that the first instance was special in that it got
> > extra CPU quota.  (I don't remember if the "first instance" that gets
> > extra CPU is the first invocation of a given handler in a process or
> > the first handler used by a new process.)
>
> > If the "first instance" does get extra CPU, lazy import is a bad
> > idea.  Instead, the first instance should use that extra CPU to do
> > things, such as import, that subsequent instances will/might need.
>
> > On Feb 9, 11:03 am, Dan Sanderson  wrote:
>
> > > I can answer of couple of these:
>
> > > On Mon, Feb 9, 2009 at 9:29 AM, Mike Wesner  wrote:
> > > > 1. How does the import cache work exactly?  I have read docs but still
> > > > am left with questions on how exactly it works.  If we have a main.py
> > > > with our main() method in it... are all the imports in that file
> > > > cached? Is there a way to keep our custom django in memory?
>
> > > All imports are cached on a per app server basis.  The first time the app
> > > imports a module on an app server, the module is loaded from disk and
> > > evaluated.  Subsequent imports of that module on that app server do not 
> > > load
> > > or evaluate any code, in the same sense as if you imported a module more
> > > than once in a single run of a Python application.
>
> > > If a handler script (a Python code file associated with a URL mapping in
> > > app.yaml) has a main() method, the entire script is loaded and evaluated 
> > > the
> > > first time the URL is requested.  On subsequent requests for the URL, the
> > > main() method is called without re-loading or re-evaluating the script.
> > >  This is similar to "importing" the handler script, with the minor
> > > difference that the main() method is not called directly on the first
> > > request, so you still have to call it in the script's code (see docs for
> > > examples) for the first request to succeed.
>
> > > If a handler script does not have a main() method, it is evaluated in full
> > > for every request, and its global variables are not retained on the app
> > > server between requests.
>
> > > > 2. Since so many people use custom django

[google-appengine] Re: Google Analytics & GAE

2009-02-09 Thread cz

use appcfg without specifying severity to get just request logs:

appcfg.py --email= request_logs 



On Feb 9, 12:45 pm, Greg  wrote:
> On Feb 10, 2:16 am, Duncan  wrote:
>
> > Logs generated on the server tell you how often particular pages have
> > been requested: that includes requests from web crawlers, and from
> > people who have gone out of their way to block Google Analytics, but
> > it excludes requests for cacheable pages which have been cached on a
> > user's browser or on an intervening proxy server.
>
> But how do you download those logs? appcfg.py seems to allow only
> debug/info/warning/error events, and I can't even get that working. If
> anyone can confirm they can download request logs, please post, and
> I'll spend more time time trying to crack it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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 Analytics & GAE

2009-02-09 Thread Greg

On Feb 10, 2:16 am, Duncan  wrote:
> Logs generated on the server tell you how often particular pages have
> been requested: that includes requests from web crawlers, and from
> people who have gone out of their way to block Google Analytics, but
> it excludes requests for cacheable pages which have been cached on a
> user's browser or on an intervening proxy server.

But how do you download those logs? appcfg.py seems to allow only
debug/info/warning/error events, and I can't even get that working. If
anyone can confirm they can download request logs, please post, and
I'll spend more time time trying to crack it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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-09 Thread Peter Blazejewicz

hi Tony,
you will need tricky implementation when testing with local server:
http://groups.google.com/group/google-appengine/browse_thread/thread/876f26e48caf5709
maybe headers mangling or some kind of server reconfiguration -
because at least "gzip" is sent as promised in "User-Agent" header,

regards,
Peter

On Feb 9, 6:32 pm, 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: GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread johnP

Another question:  where does one start to troubleshoot if caching
seems to fail.  In my case (using appengine patch) - the app.yaml
handler points to a script:  common/appenginepatch/main.py  This
module *does* define a main() script.

I placed logging.debug calls at the top of 5 common modules.  When I
click through 5 different views (each defined in the different
modules) 5 times in quick succession, I see one instance of the
logging.debug evaluating for each of these modules in the logs.  So
this tells me that something is caching, at least for this brief
period of time.

But the interesting thing is if I wait 30 seconds or a minute.  Then I
repeat the process (clicking through the 5 views in quick succession,
5 times - for a total of 25 clicks).  I see that the logging.debug
evaluates once again for each module - while the remaining 4 clicks
don't reevaluate.  So it's like the interpreter goes cold in 30
seconds.

If it is caching for 20 seconds, shouldn't it cache for a minute?  How
long should the cache last for?  Any suggestions where to look
further?









On Feb 9, 11:53 am, Andy Freeman  wrote:
> > Lazy importing (putting the import
>
> statements directly in the code paths, instead of on module start-up)
> can
> help reduce the cost of that first per-server request, though that's
> not
> always easy to do when using a framework.
>
> Hold it.  I thought that the first instance was special in that it got
> extra CPU quota.  (I don't remember if the "first instance" that gets
> extra CPU is the first invocation of a given handler in a process or
> the first handler used by a new process.)
>
> If the "first instance" does get extra CPU, lazy import is a bad
> idea.  Instead, the first instance should use that extra CPU to do
> things, such as import, that subsequent instances will/might need.
>
> On Feb 9, 11:03 am, Dan Sanderson  wrote:
>
> > I can answer of couple of these:
>
> > On Mon, Feb 9, 2009 at 9:29 AM, Mike Wesner  wrote:
> > > 1. How does the import cache work exactly?  I have read docs but still
> > > am left with questions on how exactly it works.  If we have a main.py
> > > with our main() method in it... are all the imports in that file
> > > cached? Is there a way to keep our custom django in memory?
>
> > All imports are cached on a per app server basis.  The first time the app
> > imports a module on an app server, the module is loaded from disk and
> > evaluated.  Subsequent imports of that module on that app server do not load
> > or evaluate any code, in the same sense as if you imported a module more
> > than once in a single run of a Python application.
>
> > If a handler script (a Python code file associated with a URL mapping in
> > app.yaml) has a main() method, the entire script is loaded and evaluated the
> > first time the URL is requested.  On subsequent requests for the URL, the
> > main() method is called without re-loading or re-evaluating the script.
> >  This is similar to "importing" the handler script, with the minor
> > difference that the main() method is not called directly on the first
> > request, so you still have to call it in the script's code (see docs for
> > examples) for the first request to succeed.
>
> > If a handler script does not have a main() method, it is evaluated in full
> > for every request, and its global variables are not retained on the app
> > server between requests.
>
> > > 2. Since so many people use custom django, is there any plan to
> > > provide other versions of django besides the .96 version?   Would it
> > > be possibe to provide .97 and 1.0 under some other name (import
> > > django97 as django)?   I have read that the provided django is always
> > > loaded in memory and thus would be faster.  It would sure save us a
> > > lot of files to upload also.
>
> > So far we're mostly considering upgrading the bundled Django only for the
> > next major API version.  With the way the module load path works today, it'd
> > be difficult to introduce new modules into the default environment as a
> > backwards compatible change.  As I've gone on about before here in the
> > group, having major third-party packages bundled with the API is not a good
> > way to go in the long run, and I'd rather see this need addressed by making
> > third-party packages easier to add to apps.
>
> > App caching ought to be sufficient for mitigating the time spent importing
> > modules.  Have you profiled your imports to see if they're a major
> > contributor to performance issues?  Lazy importing (putting the import
> > statements directly in the code paths, instead of on module start-up) can
> > help reduce the cost of that first per-server request, though that's not
> > always easy to do when using a framework.
>
> > -- Dan
>
>
--~--~-~--~~~---~--~~
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

[google-appengine] Re: prepopulate form fields according to http get parameters

2009-02-09 Thread Nash-t

I think you have already solved half this problem!

On Feb 8, 4:37 am, niklasr  wrote:
> On Feb 8, 10:11 am, Alexander Kojevnikov 
> wrote:
>
> > On Feb 8, 6:56 pm, niklasr  wrote:
>
> > > I'm looking for template tags or similar that according to http get
> > > request parameters set the corresponding html form fields. To achieve
> > > the selection of an html option and populate a textfield according to
> > > the http request parameters where http get with two parameters should
> > > prepopulate a textfield and the option selected in my html form /main?
> > > q=foo&w=2 should set the textfield to 'foo' and the select option 2 to
> > > state selected. I saw no template tag that directly tests or handles a
> > > http get parameter but there probably is, for a more direct and
> > > favorable way than passing the request parameters and testing option
> > > by option
> > >  
> > > ...
> > > {% ifequal w "2" %}
> > > Apples
> > > {% else %}
> > > Apples
> > >  {% endifequal %}
> > > ...
> > > Thank you
> > > Niklas
>
> > This is normally done using Django 
> > forms:http://docs.djangoproject.com/en/dev/topics/forms/
>
> Many thanks. I understand
> google.appengine.ext.db.djangoforms.ModelForm or django.forms.Form or
> just loop the options and set the selected, if only there was an
> optionFromQuery value:
> {% for currentOption in allOptions %}  value="{currentOption}" {% ifequal currentOption optionFromQuery %}
> selected{% endifequal %}>{currentOption}{% endfor %}
> Best regards
> Niklas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: is gzip content encoding served/implemented in development server for local testing?

2009-02-09 Thread Peter Blazejewicz

thx Brett!

Peter

> Yes, this is a limitation of the development server. It does not do
> any compression.
--~--~-~--~~~---~--~~
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: Download code

2009-02-09 Thread Xavier Mathews
No I Don't Think It Possible! If you could you would have to do it one by
one!

Xavier A. Mathews
Student/Browser Specialist/Developer/Web-Master
Client Based Tech Support Specialist
Hazel Crest Illinois
xavieruni...@gmail.com¥xavierunited@hotmail.com¥truestar...@yahoo.com
"Fear of a name, only increases fear of the thing itself."











On Mon, Feb 9, 2009 at 12:19 PM, Kaiser  wrote:

>
> Anybody knows how can I download all the files of a project from GAE?
> Is it possible?
>
> >
>

--~--~-~--~~~---~--~~
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] using kid with GAE

2009-02-09 Thread jmt

Does anyone know if the kid template module is a supported template
engine on Google App Engine?

I am very new to the kid module and just wanted to give it a shot as a
Google App Engine project and I receive the following when running my
sample code thru dev_appserver.py :

63 class KidFile(object):
   64 magic = imp.get_magic()
   65
   66 def __init__(self, kid_file, force=False,
magic undefined, global imp = None, imp.get_magic undefined

: 'module' object has no attribute
'get_magic'

I basically get this during the kid module import.

Sorry if this has already been covered, in general I am new to GAE as
well.

Thanks in advance,

jmt

--~--~-~--~~~---~--~~
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] Download code

2009-02-09 Thread Kaiser

Anybody knows how can I download all the files of a project from GAE?
Is it possible?

--~--~-~--~~~---~--~~
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: GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread Andy Freeman

> Lazy importing (putting the import
statements directly in the code paths, instead of on module start-up)
can
help reduce the cost of that first per-server request, though that's
not
always easy to do when using a framework.

Hold it.  I thought that the first instance was special in that it got
extra CPU quota.  (I don't remember if the "first instance" that gets
extra CPU is the first invocation of a given handler in a process or
the first handler used by a new process.)

If the "first instance" does get extra CPU, lazy import is a bad
idea.  Instead, the first instance should use that extra CPU to do
things, such as import, that subsequent instances will/might need.

On Feb 9, 11:03 am, Dan Sanderson  wrote:
> I can answer of couple of these:
>
> On Mon, Feb 9, 2009 at 9:29 AM, Mike Wesner  wrote:
> > 1. How does the import cache work exactly?  I have read docs but still
> > am left with questions on how exactly it works.  If we have a main.py
> > with our main() method in it... are all the imports in that file
> > cached? Is there a way to keep our custom django in memory?
>
> All imports are cached on a per app server basis.  The first time the app
> imports a module on an app server, the module is loaded from disk and
> evaluated.  Subsequent imports of that module on that app server do not load
> or evaluate any code, in the same sense as if you imported a module more
> than once in a single run of a Python application.
>
> If a handler script (a Python code file associated with a URL mapping in
> app.yaml) has a main() method, the entire script is loaded and evaluated the
> first time the URL is requested.  On subsequent requests for the URL, the
> main() method is called without re-loading or re-evaluating the script.
>  This is similar to "importing" the handler script, with the minor
> difference that the main() method is not called directly on the first
> request, so you still have to call it in the script's code (see docs for
> examples) for the first request to succeed.
>
> If a handler script does not have a main() method, it is evaluated in full
> for every request, and its global variables are not retained on the app
> server between requests.
>
> > 2. Since so many people use custom django, is there any plan to
> > provide other versions of django besides the .96 version?   Would it
> > be possibe to provide .97 and 1.0 under some other name (import
> > django97 as django)?   I have read that the provided django is always
> > loaded in memory and thus would be faster.  It would sure save us a
> > lot of files to upload also.
>
> So far we're mostly considering upgrading the bundled Django only for the
> next major API version.  With the way the module load path works today, it'd
> be difficult to introduce new modules into the default environment as a
> backwards compatible change.  As I've gone on about before here in the
> group, having major third-party packages bundled with the API is not a good
> way to go in the long run, and I'd rather see this need addressed by making
> third-party packages easier to add to apps.
>
> App caching ought to be sufficient for mitigating the time spent importing
> modules.  Have you profiled your imports to see if they're a major
> contributor to performance issues?  Lazy importing (putting the import
> statements directly in the code paths, instead of on module start-up) can
> help reduce the cost of that first per-server request, though that's not
> always easy to do when using a framework.
>
> -- Dan
--~--~-~--~~~---~--~~
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: Roadmap update and XMMP

2009-02-09 Thread Roberto Saccon

thanks for the info. So this seems more to be targeted to real IM
clients than something like BOSH over HTTP for in-browser XMPP.

On Feb 9, 2:56 pm, Dan Sanderson  wrote:
> XMPP support will not take the form of long running processes.  XMPP
> connections will be maintained by servers that relay incoming messages to
> the app's XMPP handlers, each of which will execute just like an HTTP
> request handler.  There will also be an API for sending XMPP messages from
> the app, among other things.
> -- Dan
>
> On Sat, Feb 7, 2009 at 7:24 AM, Roberto Saccon  wrote:
>
> > Uuhh, typo, I mean XMPP, see
> >http://code.google.com/intl/und/appengine/docs/roadmap.html
>
> > On Feb 7, 12:20 pm, Roberto Saccon  wrote:
> > > Now we know it, XMMP comes to appengine. So far, appengine has been
> > > limited to shortlived-HTTP requests.  What are the educated guesses
> > > (or somebody who knows it, is allowed to speak out loud here ...),
> > > will XMMP bring streaming HTTP request with possibly longer lifetime
> > > than 10 sec to appengine (but also higher cost, like HTTPS), so we can
> > > do long-polling or other serverpush hacks ? Or none of this, it will
> > > run on the same platform and just normal polling will be
> > > "encouraged" ?
>
> > > Roberto
>
>
--~--~-~--~~~---~--~~
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: GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread Dan Sanderson
I can answer of couple of these:

On Mon, Feb 9, 2009 at 9:29 AM, Mike Wesner  wrote:

> 1. How does the import cache work exactly?  I have read docs but still
> am left with questions on how exactly it works.  If we have a main.py
> with our main() method in it... are all the imports in that file
> cached? Is there a way to keep our custom django in memory?
>

All imports are cached on a per app server basis.  The first time the app
imports a module on an app server, the module is loaded from disk and
evaluated.  Subsequent imports of that module on that app server do not load
or evaluate any code, in the same sense as if you imported a module more
than once in a single run of a Python application.

If a handler script (a Python code file associated with a URL mapping in
app.yaml) has a main() method, the entire script is loaded and evaluated the
first time the URL is requested.  On subsequent requests for the URL, the
main() method is called without re-loading or re-evaluating the script.
 This is similar to "importing" the handler script, with the minor
difference that the main() method is not called directly on the first
request, so you still have to call it in the script's code (see docs for
examples) for the first request to succeed.

If a handler script does not have a main() method, it is evaluated in full
for every request, and its global variables are not retained on the app
server between requests.


> 2. Since so many people use custom django, is there any plan to
> provide other versions of django besides the .96 version?   Would it
> be possibe to provide .97 and 1.0 under some other name (import
> django97 as django)?   I have read that the provided django is always
> loaded in memory and thus would be faster.  It would sure save us a
> lot of files to upload also.


So far we're mostly considering upgrading the bundled Django only for the
next major API version.  With the way the module load path works today, it'd
be difficult to introduce new modules into the default environment as a
backwards compatible change.  As I've gone on about before here in the
group, having major third-party packages bundled with the API is not a good
way to go in the long run, and I'd rather see this need addressed by making
third-party packages easier to add to apps.

App caching ought to be sufficient for mitigating the time spent importing
modules.  Have you profiled your imports to see if they're a major
contributor to performance issues?  Lazy importing (putting the import
statements directly in the code paths, instead of on module start-up) can
help reduce the cost of that first per-server request, though that's not
always easy to do when using a framework.

-- Dan

--~--~-~--~~~---~--~~
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: Again *major* server errors of app engine!

2009-02-09 Thread conman

No, I don't understand why the app has problems loading django at some
specific times of the day...

Today everything seems normal but I don't have a good feeling if the
source of the error is not clear and so it may still exist.

Maybe someone of google can shed some light into that??

Regards,
Constantin

--~--~-~--~~~---~--~~
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: Transcript: App Engine chat time Feb 4

2009-02-09 Thread ryan

good chat! there are a couple datastore subtleties here that i'd like
to expand on:

> [7:37pm] Adhir: marzia:db.put(200 obj) is taking ~2 seconds,is it normal? is
> there any way to reduce this
> [7:37pm] marzia_google: As my flip-flops will attest to, I am in california
> [7:37pm] marzia_google: put on 200 objects?
> [7:37pm] Adhir: yes
> [7:38pm] marzia_google: puts, in general, are much much much much slower than
> reads
> [7:38pm] marzia_google: by design
> [7:39pm] marzia_google: *plug*
> http://sites.google.com/site/io/under-the-covers-of-the-google-app-en...
> [7:39pm] pr3d4t0r: marzia_google: Would making all those objects part of the 
> same
> entity group help, though?
> [7:39pm] marzia_google: then you would definitely run in to contention issues
> [7:39pm] marzia_google: or, most probably
> [7:39pm] marzia_google: i would say it's unlikely you would want an entity 
> group
> with 200 entities

the spirit here is in the right place, and yes, 2s for a put with 200
entities is not unreasonable. happily, though, entities within a batch
put or delete will never cause contention with themselves. batch
operations automatically group entities by entity group and write each
entity group as a whole. this both avoids contention and decreases
overall latency.

also, 200 entities per entity group is larger than usual, but isn't
problematic on its own. the problem for entity groups is mainly write
throughput from concurrent requests, not size. entity groups with tens
or even hundreds of thousands of entities may be ok, as long as
they're not consistenly being written to by many different requests at
once.
--~--~-~--~~~---~--~~
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: Roadmap update and XMMP

2009-02-09 Thread Dan Sanderson
XMPP support will not take the form of long running processes.  XMPP
connections will be maintained by servers that relay incoming messages to
the app's XMPP handlers, each of which will execute just like an HTTP
request handler.  There will also be an API for sending XMPP messages from
the app, among other things.
-- Dan

On Sat, Feb 7, 2009 at 7:24 AM, Roberto Saccon  wrote:

>
> Uuhh, typo, I mean XMPP, see
> http://code.google.com/intl/und/appengine/docs/roadmap.html
>
> On Feb 7, 12:20 pm, Roberto Saccon  wrote:
> > Now we know it, XMMP comes to appengine. So far, appengine has been
> > limited to shortlived-HTTP requests.  What are the educated guesses
> > (or somebody who knows it, is allowed to speak out loud here ...),
> > will XMMP bring streaming HTTP request with possibly longer lifetime
> > than 10 sec to appengine (but also higher cost, like HTTPS), so we can
> > do long-polling or other serverpush hacks ? Or none of this, it will
> > run on the same platform and just normal polling will be
> > "encouraged" ?
> >
> > Roberto
> >
>

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

2009-02-09 Thread Dan Sanderson
On Mon, Feb 9, 2009 at 5:17 AM, arnie  wrote:

>
> I would like to become clear about this:
> I have registered an app on appspot.com that is consuming a datastore
> table [created within the app]. The GAE allows for creating 10
> applications, so i created another with version 2. Earlier app has
> version 1. Will the app with version 2 share the same data [as is
> created using version1] or does the version2 will have a copy of the
> datastore table as is available in version 1?


It sounds like you registered 2 applications.  One application cannot see
another application's datastore.

App versions allow you to upload a new version of an application for testing
without making it the publicly accessible version right away.  The "default"
version is accessible by the public on your usual domain name.  Any other
version that isn't the default can be accessed by admins with a special URL
of the form: #.latest.app-id.appspot.com  All versions of the same
application use the same datastore.

To upload a new version of an application, change the "version:" parameter
in your app.yaml file before uploading.  Visit the "Versions" section of the
Admin Console to see what versions have been uploaded, change the default
version, and delete old versions.

-- Dan

--~--~-~--~~~---~--~~
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: Server Error Status getting lost

2009-02-09 Thread Marzia Niccolai

Hi,

self.error(500) just sets the status code and clears the response, it
doesn't render any message in the browser. From
http://code.google.com/p/googleappengine/source/browse/trunk/google/appengine/ext/webapp/__init__.py:

  def error(self, code):
"""Clears the response output stream and sets the given HTTP error code.

Args:
  code: the HTTP status error code (e.g., 501)
"""
self.response.set_status(code)
self.response.clear()

-Marzia

On Sun, Feb 8, 2009 at 7:26 PM, joshuacronemeyer
 wrote:
>
> When my server responds with an error I can see it in the server log,
> but in my browser the response is just a blank page instead of the
> error I sent.
>
> Here is my code:
>
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class Hello(webapp.RequestHandler):
>  def get(self):
>self.error(500)
>
> def main():
>  run_wsgi_app(application)
>
> application = webapp.WSGIApplication([('/', Hello)],debug=True)
>
> if __name__ == "__main__":
>  main()
>
> When I hit the page the log shows:
> INFO 2009-02-09 02:47:35,082 dev_appserver.py] "GET / HTTP/1.1"
> 500 -
>
> But the page is just a blank page
>
> >
>

--~--~-~--~~~---~--~~
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: does setting http headers work? in particular Cache-Control?

2009-02-09 Thread Marzia Niccolai

Hi,

There should be no problem setting the cache control header on your
request. Please provide the code you are using to generate your
response and headers for additional troubleshooting.

-Marzia

On Sat, Feb 7, 2009 at 2:35 AM, dabide  wrote:
>
> i have been trying in vain to set the response headers to enable
> caching.
> no matter what i do, i get Cache-Control: no-cache
>
> i have tried various combinations self.response.headers['Cache-
> Control']=
> 'public', 'private', 'public,max-age=3600'
>
> the Cache-Control header is always 'no-cache' (as viewed in firebug)
>
> just for yucks, i tried to add a made up header 'x-does-this-work',
> but no, that does not work.
>
> the only header i have been able to modify is the Content-Type header.
>
> am i doing something wrong?
>
>
> >
>

--~--~-~--~~~---~--~~
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: Template extention

2009-02-09 Thread Marzia Niccolai

Hi,

Without more information as to where your files are located, it's
difficult to diagnose, but the issue may be that you have
baseTemp.html in a directory you have specified as static in your
app.yaml.

-Marzia

On Mon, Feb 9, 2009 at 2:22 AM, dbikard  wrote:
>
> Hi,
>
> I'm having a problem with template extension. My app works perfectly
> fine on the dev_appserver but once uploaded with appcfg, I get the
> error: Template 'baseTemp.html' cannot be extended, because it doesn't
> exist.
>
> Here my index page extends the baseTemp.html template.
>
> Does anyone knows what the problem is? Thx a lot,
> David
>
> >
>

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

2009-02-09 Thread Tony Arkles


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: QueryIterator Error

2009-02-09 Thread Marzia Niccolai

Hi,

Can you please post the code to the handler where you are seeing this issue.

-Marzia

On Sun, Feb 8, 2009 at 7:30 AM, Davide Ferrero  wrote:
>
> From 2 two days my applications fall in error in every pages. I don't
> have modified nothing from 1 week and three days ago my application
> works correctly.. this is the error log:
>
> #
>  02-08 07:24AM 44.966 / 500 194ms 139ms-cpu 0kb
>  See details
>  79.50.168.248 - - [08/Feb/2009:07:24:45 -0800] "GET / HTTP/1.1"
> 500 104 - -
>  E 02-08 07:24AM 45.081
>
>  'Query' object has no attribute '_Query__query_sets'
>  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/sbook/1.331254528912766865/
> main.py", line 89, in get
>  tags=Cloud.tagCloud()
>File "/base/data/home/apps/sbook/1.331254528912766865/
> main.py", line 173, in tagCloud
>  for q in q1:
>File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1336, in __iter__
>  return self.run()
>File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1328, in run
>  return _QueryIterator(self._model_class, iter(self._get_query
> ().Run()))
>File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1547, in _get_query
>  for query_set in self.__query_sets:
>  AttributeError: 'Query' object has no attribute
> '_Query__query_sets'
>
> 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] GAE Team, How does the import cache work? How do we reduce custom django overhead?

2009-02-09 Thread Mike Wesner

Many app engine users are using their own django, uploaded with their
app.  Many of those people are also using the
InstallAppengineHelperForDjango() also to make it work.

Possibly related.  Many people including myself have been experiencing
500 errors that show class DeadlineExceededError in them. It usually
occurs for most of us in the django or django helper code before our
views or 'our code' even runs, before any datastore activity happens.

So my questions are:

1. How does the import cache work exactly?  I have read docs but still
am left with questions on how exactly it works.  If we have a main.py
with our main() method in it... are all the imports in that file
cached? Is there a way to keep our custom django in memory?

2. Since so many people use custom django, is there any plan to
provide other versions of django besides the .96 version?   Would it
be possibe to provide .97 and 1.0 under some other name (import
django97 as django)?   I have read that the provided django is always
loaded in memory and thus would be faster.  It would sure save us a
lot of files to upload also.

3. Do you have any other advice on using custom django?  any advice on
the high cpu warnings I get because of (IMO lgiht) datastore usage?
(when the pay service is running, will that be less of an issue?)

Thanks GAE team!

-Mike
--~--~-~--~~~---~--~~
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: Again *major* server errors of app engine!

2009-02-09 Thread Thomas Wittek

On Feb 8, 11:09 am, Thomas Wittek  wrote:
> On Feb 8, 9:19 am, conman 
> wrote:
>
> > Davel63, are you also using appengine patch?
>
> I have a site with appengine monkey and Pylons.
> I got that error quite often.

Update:
I switched over to webapp.py and I don't have these problems anymore
now.
Not an option for people who invested a lot in a certain framework,
though.

Regards
--~--~-~--~~~---~--~~
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] Newbie question - How i do expose class method to http Requests?

2009-02-09 Thread mohit_ranka

I have written a class method that expects argument from GET/POST
call. The method works well if i create a class object and call the
method with parameters, from script (if __name__ == "__main__").

How do i make it listen to the HTTP Requests?

Thanks and regards,
Mohit Ranka

--~--~-~--~~~---~--~~
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: python problems - HTTPSHandler

2009-02-09 Thread Haiming

I encountered similar problem on Ubuntu Linux:

$ dev_appserver.py evaluation/
Traceback (most recent call last):
  File "/usr/local/google/laihaiming/google_appengine/
dev_appserver.py", line 55, in 
execfile(script_path, globals())
  File "/usr/local/google/laihaiming/google_appengine/google/appengine/
tools/dev_appserver_main.py", line 358, in 
sys.exit(main(sys.argv))
  File "/usr/local/google/laihaiming/google_appengine/google/appengine/
tools/dev_appserver_main.py", line 316, in main
server = MakeRpcServer(option_dict)
  File "/usr/local/google/laihaiming/google_appengine/google/appengine/
tools/dev_appserver_main.py", line 277, in MakeRpcServer
host_override=option_dict[ARG_ADMIN_CONSOLE_HOST])
  File "/usr/local/google/laihaiming/google_appengine/google/appengine/
tools/appcfg.py", line 125, in __init__
self.opener = self._GetOpener()
  File "/usr/local/google/laihaiming/google_appengine/google/appengine/
tools/appcfg.py", line 338, in _GetOpener
opener.add_handler(urllib2.HTTPSHandler())
AttributeError: 'module' object has no attribute 'HTTPSHandler'

My python version is 2.5.4. Does anyone know the cause ?

On Feb 4, 4:42 am, Alexander Artemenko 
wrote:
> I have found, that if you are working with macports, than you need to
> install py25-socket-ssl module:
>
> sudo port install py25-socket-ssl
>
> I suggest, if you are working on the "debian like" linux, then you
> should try something like that first:
>
> apt-cache search python ssl
>
> Or, as a last resort, make sudo easy_install ssl (i should download
> and install ssl module from thehttp://pypi.python.org/pypi/ssl/)
>
> On 2 фев, 21:57, Robert  wrote:
>
> > Interestingly, things work just fine on my Mac. I was having problems
> > with the Linux setup.
>
> Good luck

--~--~-~--~~~---~--~~
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] Server Error Status getting lost

2009-02-09 Thread joshuacronemeyer

When my server responds with an error I can see it in the server log,
but in my browser the response is just a blank page instead of the
error I sent.

Here is my code:

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class Hello(webapp.RequestHandler):
  def get(self):
self.error(500)

def main():
  run_wsgi_app(application)

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

if __name__ == "__main__":
  main()

When I hit the page the log shows:
INFO 2009-02-09 02:47:35,082 dev_appserver.py] "GET / HTTP/1.1"
500 -

But the page is just a blank page

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



Re: 答复: [google-appengine] urlfetch pro blem

2009-02-09 Thread admin go2
You should use POST instead of GET. Since GET request would hit the google
cache server.
If you must use GET request, please  try this url
http://server/index.php?auth=authstring&random=a_random_number

And make sure authstring is urlencoded.

go2.appspot.com

http://go2.appspot.com


>
>
> Hi everyone,
>
> I'm having trouble with using urlfetch. I'm trying to fetch a page
> that needs authentication. The authentication is done by using an url
> parameter (ie http://server/index.php?auth=authstring).
>
> When I write the url in my browser, the page I want is shown. When I
> call the fetch function with the same url, the login page is retrieved
> instead of the expected page, as if the authentication parameter
> wasn't recognised. I'm calling the function only with the url as the
> parameter ( urlfetch.fetch(http://server/index.php?auth=authstring) ),
> so the request should be a normal GET request.
>
> Could you please tell me what am I doing wrong?
>
> Thanks in advance.
> >

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



[google-appengine] Re: Again *major* server errors of app engine!

2009-02-09 Thread Thomas Wittek

On Feb 8, 9:19 am, conman 
wrote:
> Davel63, are you also using appengine patch?

I have a site with appengine monkey and Pylons.
I got that error quite often.

To me it looks like a fresh start of Pylons (a lot of imports etc)
just takes more time than allowed.
Unfortunately I don't see what you can do here besides
a) not using Pylons (sad)
b) extend the deadline (won't happen, I guess)
c) throw more resources at it (won't happen either, I guess)

As I have a rather small app I'll probably try to port it  to
something lighter (webapp.py).
For people who invested a lot of time in their app running on a big
framework that wouldn't be an option really.

Regards
--
Thomas Wittek
Web: http://thomas.wittek.me/
Jabber: tho...@wittek.me

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



[google-appengine] Re: HELP!

2009-02-09 Thread tomkruij...@gmail.com

I am having exactly the same problem. I've tried running it from
numerous locations with various paths to the application directory
(including the one suggested above), but I get the same error every
time. Any help would be great.

--~--~-~--~~~---~--~~
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 ( App Engine + Web Toolkit )

2009-02-09 Thread Peter Blazejewicz

hi Omer,
> In general, would you recommend GWT + App Engine for developing something,
if you put backend language, custom transport serialization format and
programming interface aside, GWT still allows you to create fast,
small and cross-browser client side code.
You could always use python backend code and non-serialized json layer
(which could be bind in GWT 1.5 via json-bindings).
People already worked on more GWT-centrish solutions for GAE to
minimize number of code you'd write in Python:
http://code.google.com/p/python-gwt-rpc/
Peter

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



[google-appengine] does setting http headers work? in particular Cache-Control?

2009-02-09 Thread dabide

i have been trying in vain to set the response headers to enable
caching.
no matter what i do, i get Cache-Control: no-cache

i have tried various combinations self.response.headers['Cache-
Control']=
'public', 'private', 'public,max-age=3600'

the Cache-Control header is always 'no-cache' (as viewed in firebug)

just for yucks, i tried to add a made up header 'x-does-this-work',
but no, that does not work.

the only header i have been able to modify is the Content-Type header.

am i doing something wrong?


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

2009-02-09 Thread kang
The different versions of on application share one datastore

On Mon, Feb 9, 2009 at 9:17 PM, arnie  wrote:

>
> I would like to become clear about this:
> I have registered an app on appspot.com that is consuming a datastore
> table [created within the app]. The GAE allows for creating 10
> applications, so i created another with version 2. Earlier app has
> version 1. Will the app with version 2 share the same data [as is
> created using version1] or does the version2 will have a copy of the
> datastore table as is available in version 1?
> Thanks
> Arnie
> >
>


-- 
Stay hungry,Stay foolish.

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



[google-appengine] Re: Clarification

2009-02-09 Thread ramu

If they are 2 different x.appspot.com, than there CAN NOT BE any
relationship between DATA TABLES of both application, unless you
design exclusive transfer over HTTP from 1 to another. This is what I
understand system to be .

On Feb 9, 5:17 am, arnie  wrote:
> I would like to become clear about this:
> I have registered an app on appspot.com that is consuming a datastore
> table [created within the app]. The GAE allows for creating 10
> applications, so i created another with version 2. Earlier app has
> version 1. Will the app with version 2 share the same data [as is
> created using version1] or does the version2 will have a copy of the
> datastore table as is available in version 1?
> Thanks
> Arnie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Clarification

2009-02-09 Thread arnie

I would like to become clear about this:
I have registered an app on appspot.com that is consuming a datastore
table [created within the app]. The GAE allows for creating 10
applications, so i created another with version 2. Earlier app has
version 1. Will the app with version 2 share the same data [as is
created using version1] or does the version2 will have a copy of the
datastore table as is available in version 1?
Thanks
Arnie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Google Analytics & GAE

2009-02-09 Thread Duncan

On Feb 9, 12:33 pm, Anders  wrote:
> I just got an idea about having GAE applications directly connected to
> Google Analytics. Instead of having JavaScript snippets pasted into
> the application's webpages, to have the integration done on the server
> level.

Logs generated on the server tell you how often particular pages have
been requested: that includes requests from web crawlers, and from
people who have gone out of their way to block Google Analytics, but
it excludes requests for cacheable pages which have been cached on a
user's browser or on an intervening proxy server.

Google Analytics tells you about page views from browsers that execute
Javascript. It excludes web crawlers (which don't generally execute
scripts) and also excludes people running advert blockers that have
been configured to block access to Analytics. However, it does include
each page view separately even if the page itself was cached and no
request went up to the server. Analytics can also track link clicks on
a page (e.g. exit clicks going to another site) if you have configured
it to do that.

So server side and client side give you two different, but in both
cases incomplete, sets of statistics.

--~--~-~--~~~---~--~~
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 Analytics & GAE

2009-02-09 Thread Anders

I found this:

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

It talks about the need for setting cookies manually in the
application to improve user tracking. It would be good to have the
Google Analytics integration without having to set cookies manually in
the application (cookies could be an additional option).
--~--~-~--~~~---~--~~
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 Analytics & GAE

2009-02-09 Thread Anders

I just got an idea about having GAE applications directly connected to
Google Analytics. Instead of having JavaScript snippets pasted into
the application's webpages, to have the integration done on the server
level.

Google could for example add an option in Google Analytics that allows
GAE applications to be tracked. I don't know how difficult, time-
consuming or costly it would be for Google to implement that, and
there may be legal issues that must be cleared and so on, or Google is
perhaps already working on this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Template extention

2009-02-09 Thread dbikard

Hi,

I'm having a problem with template extension. My app works perfectly
fine on the dev_appserver but once uploaded with appcfg, I get the
error: Template 'baseTemp.html' cannot be extended, because it doesn't
exist.

Here my index page extends the baseTemp.html template.

Does anyone knows what the problem is? Thx a lot,
David

--~--~-~--~~~---~--~~
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: Problem with memcache.get_multi

2009-02-09 Thread Savraj

My bad.  Was using incorrect keys.  Works great now.

-s

On Jan 29, 4:44 pm, Savraj  wrote:
> Hi folks,
>
> I'm having a very curious problem with get_multi.  I'm giving it a
> list of keys ten items long.  It finds items 1 and 2 without issue,
> but doesn't find the last eight.
>
> If I reverse the search list and then use get_multi, I now get items 9
> and 10, but not 8 through 1.
>
> If I make individual calls to memcache.get in a loop, I manage to get
> back all 10 items.  ;)
>
> My code was working great before, and I've only been running in to
> this problem today.  The only difference is that my memcache entries
> now hold a bunch more data than before -- which I suspect may be the
> issue?  Though I'm not getting any errors when storing the items, and
> they can all be recovered individually. Any help?
>
> Thanks for your help!Savraj
> (currently in 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] Printing Debug Messages Inside bulkload.Loader

2009-02-09 Thread Chris

How do you display debug messages from inside bulkload.Loader
instances? Both print and logging seemed to be blocked or overwritten
by the the logging in the bulk upload client.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---