[google-appengine] InPyTut - Interactive Python Tutorial

2008-08-30 Thread Davide Rognoni

This tutorial is useful for the Python newbie
http://pyoohtml.appspot.com/IronBrowser/static/InPyTut/index.html

For the scripts execution you must open the URL using IronBrowser
(Iron Python Web Browser)
http://pyoohtml.appspot.com/IronBrowser/download

IronBrowser depend from IronPython (the implementation of the Python
programming language on .NET)
http://www.codeplex.com/IronPython

Comments here
http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chMLEgxBcHBsaWNhdGlvbnMY-CsM

Bye bye :-)

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



[google-appengine] Re: Encoding character. How to search/store strings with non-ascii chars?

2008-08-30 Thread Kyle Jensen

Hi Juan, try using the uxxx format, e.g.

ctmp = Category.gql(WHERE title = :1, uFórmula 1).get()

Also, maybe make sure your HTML files use utf-8 encoding...mine have
meta http-equiv=content-type content=application/xhtml+xml;
charset=utf-8/
in the header and
?xml version=1.0 encoding=utf-8?
at the very top (ahead of the html tag)

buen suerte, kyle

On Aug 28, 6:01 pm, Merlos [EMAIL PROTECTED] wrote:
 Hi all,

 I have a problem to get data that uses non ascii characters such as
 º,ª,á,é,í,ó,ú...

 I will explain how do I store and try to retrieve the data:

 On top of the python source file I have:
 # -*- coding: utf-8 -*-

 The form input:
 input type=text name=title value= /

 Processing the form:
 def post...
     ...
     category.title = self.request.get(title)
     ...
     category.put()

 I fill the form with a category with title Fórmula 1
 I fill the form with a category with title Baloncesto (basket)

 Trying to find the category by title

 ctmp = Category.gql(WHERE title = :1,Fórmula 1).get()
 if ctmp is None:
     self.response.out.write(Enjuto says: I cannot find tilded
 words :_()
 else:
      self.response.out.write(Pataliebre! I found it)

 Searching Fórmula 1 is always None, but searching Baloncesto works
 fine.

 Somebody knows how do I have to store and retrieve data that has no
 ascii chars?

 Thank you in advance. Juan.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Same request *sometimes* gives high CPU warning -- random?

2008-08-30 Thread Kyle Jensen


Our app serves has a few hundred hits a day at a particular url/view.
Seemingly randomly, some of these requests will throw the high CPU
warning, i.e.

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

But, its certainly not all the time. Just seems to be some times.
Nothing special as far as I can tell about these requests.

Does this happen to other people?  Is it just ghosts in the machine?

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



[google-appengine] Re: Having doubts about AppEngine

2008-08-30 Thread Michael Schreifels

Davide,

I really don't see the Django template language being a valid concern
at all. It is just a library that Google provides, no one is forcing
you to use it.

And further, personally I think that if you find Django templates too
limiting, you probably don't fully understand it. I switched to Django
after coding with Ruby on Rails and PHP, both of which allow you to
embed code right in your templates. It was a difficult transition at
first, but the restrictions placed by the Django template language
make sense, and they encourage good programming practices of the
separation between programming logic and presentation code.

And if you're concerned about reusing blocks of code, the concerns
about {% with %} are only relevant to Django  1.0, and the devs have
been telling users to use SVN (which is very stable) and not 0.96 for
MONTHS now. (Yeah, AE only supports 0.96 out-of-the-box, but that
makes sense. Why would Google want to track SVN? I just have my own
checkout of Django I use. And besides, Django 1.0 is due for release
next week. I guarantee Google will support it.) And besides, I have
never had to use {% with %}. Most code repetition I come across is
more logically solved with block inheritance.

I strongly recommend you upgrade to the latest Django beta and read
the template docs. And if it really doesn't work for you, there are
plenty of other options.

This post is really about the problems that Google has with
communications about where App Engine is going (and WHEN).


On Aug 30, 4:56 am, Davide Rognoni [EMAIL PROTECTED] wrote:
 Doubts about Django 
 Templatehttp://groups.google.com/group/google-appengine/browse_thread/thread/...

 On Aug 28, 12:09 am, javaDinosaur [EMAIL PROTECTED] wrote:

  I am starting to have doubts about continuing to develop my
  applications for GAE. My concerns are not technical although I have a
  some anxieties about transaction data propagation performance.

  My concerns center around Google’s commitment to the App Engine
  project. Compared to Amazon’s Web Service forums this place feels like
  a technical backwater. Developers hosting on Amazon AWS post
  interesting questions and get deep-dive replies promptly from Amazon
  staff. Amazon is releasing new Cloud development services monthly yet
  all we get is minor patches.

  Here on the GAE forum elementary questions about how GAE ticks go
  unanswered for months. Basic roadmap type info such as will we get SSL
  or scheduled tasks is missing.

  I just feel that the GAE Team is not building up any development
  stream in what should be the last 4 month run up to the year-end
  release. Communication with the developer community here is abysmal
  compared to the investment in developer relations made by companies
  such as Microsoft, Redhat or Amazon.

  What’s happened to the early buzz Google? Has the top bass pinched
  half the team to firefight problems on another project?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Having doubts about AppEngine

2008-08-30 Thread Davide Rognoni

No no, this post is for all: Having doubts about AppEngine

1) My concerns center around Google’s commitment to the App Engine
project

My concerns center around Google’s commitment to Django template.

2) Here on the GAE forum elementary questions about how GAE ticks
go unanswered for months

Also about the template system.

3) Communication with the developer community here is abysmal
compared to the investment in developer relations made by companies
such as Microsoft Redhat or Amazon

Django is free, no investment.


On Aug 30, 9:05 pm, Michael Schreifels [EMAIL PROTECTED] wrote:
 Davide,

 I really don't see the Django template language being a valid concern
 at all. It is just a library that Google provides, no one is forcing
 you to use it.

 And further, personally I think that if you find Django templates too
 limiting, you probably don't fully understand it. I switched to Django
 after coding with Ruby on Rails and PHP, both of which allow you to
 embed code right in your templates. It was a difficult transition at
 first, but the restrictions placed by the Django template language
 make sense, and they encourage good programming practices of the
 separation between programming logic and presentation code.

 And if you're concerned about reusing blocks of code, the concerns
 about {% with %} are only relevant to Django  1.0, and the devs have
 been telling users to use SVN (which is very stable) and not 0.96 for
 MONTHS now. (Yeah, AE only supports 0.96 out-of-the-box, but that
 makes sense. Why would Google want to track SVN? I just have my own
 checkout of Django I use. And besides, Django 1.0 is due for release
 next week. I guarantee Google will support it.) And besides, I have
 never had to use {% with %}. Most code repetition I come across is
 more logically solved with block inheritance.

 I strongly recommend you upgrade to the latest Django beta and read
 the template docs. And if it really doesn't work for you, there are
 plenty of other options.

 This post is really about the problems that Google has with
 communications about where App Engine is going (and WHEN).

 On Aug 30, 4:56 am, Davide Rognoni [EMAIL PROTECTED] wrote:

  Doubts about Django 
  Templatehttp://groups.google.com/group/google-appengine/browse_thread/thread/...

  On Aug 28, 12:09 am, javaDinosaur [EMAIL PROTECTED] wrote:

   I am starting to have doubts about continuing to develop my
   applications for GAE. My concerns are not technical although I have a
   some anxieties about transaction data propagation performance.

   My concerns center around Google’s commitment to the App Engine
   project. Compared to Amazon’s Web Service forums this place feels like
   a technical backwater. Developers hosting on Amazon AWS post
   interesting questions and get deep-dive replies promptly from Amazon
   staff. Amazon is releasing new Cloud development services monthly yet
   all we get is minor patches.

   Here on the GAE forum elementary questions about how GAE ticks go
   unanswered for months. Basic roadmap type info such as will we get SSL
   or scheduled tasks is missing.

   I just feel that the GAE Team is not building up any development
   stream in what should be the last 4 month run up to the year-end
   release. Communication with the developer community here is abysmal
   compared to the investment in developer relations made by companies
   such as Microsoft, Redhat or Amazon.

   What’s happened to the early buzz Google? Has the top bass pinched
   half the team to firefight problems on another project?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: newbie doubt:TemplateDoesNotExist in live

2008-08-30 Thread Davide Rognoni

See here
http://www.djangobook.com/en/1.0/chapter04/

or send me your project source (a ZIP file, please)


On Aug 30, 7:27 pm, v4vijayakumar [EMAIL PROTECTED]
wrote:
 I am getting TemplateDoesNotExist error when I access my app. It was
 working fine with dev_appserver.

 raise TemplateDoesNotExist, name
 TemplateDoesNotExist: main.html

 I guess something is wrong with the template path, but couldn't figure
 it out.

   template_path = os.path.join(os.path.dirname(__file__),
     'templates/main.html')

 I also tried this.

   template_path = 'templates/main.html'

 I just can't wait to see my app online, any quick help would be
 great. :)

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



[google-appengine] Re: Having doubts about AppEngine

2008-08-30 Thread Davide Rognoni

from
http://www.cmlenz.net/archives/2007/06/logic-in-templates

How could a custom, sparingly documented, somewhat inconsistent,
and mostly unproven (compared to Python) mini expression language be
any better for template authors?

In my humble opinion, this kind of “dumbed-down” templating results
in only one thing: more lines of code in the application modules,
lines of code that are really only about presentation, and should be
in the templates. And frustration every single time you need to add
those lines.


On Aug 30, 11:09 pm, Roberto Saccon [EMAIL PROTECTED] wrote:
 Davide, nobody cares about your personal concerns around Google’s
 commitment to Django templates. There are plenty of other frameworks
 and template languages, choose the one which fits your needs or if
 none fits your needs build  one yourself (aren't you doing that
 already, the JS thingy ??), I am happy that Google has chosen the most
 popular one in Python land.

 regards
 Roberto

 On Aug 30, 4:34 pm, Davide Rognoni [EMAIL PROTECTED] wrote:

  No no, this post is for all: Having doubts about AppEngine

  1) My concerns center around Google’s commitment to the App Engine
  project

  My concerns center around Google’s commitment to Django template.

  2) Here on the GAE forum elementary questions about how GAE ticks
  go unanswered for months

  Also about the template system.

  3) Communication with the developer community here is abysmal
  compared to the investment in developer relations made by companies
  such as Microsoft Redhat or Amazon

  Django is free, no investment.

  On Aug 30, 9:05 pm, Michael Schreifels [EMAIL PROTECTED] wrote:

   Davide,

   I really don't see the Django template language being a valid concern
   at all. It is just a library that Google provides, no one is forcing
   you to use it.

   And further, personally I think that if you find Django templates too
   limiting, you probably don't fully understand it. I switched to Django
   after coding with Ruby on Rails and PHP, both of which allow you to
   embed code right in your templates. It was a difficult transition at
   first, but the restrictions placed by the Django template language
   make sense, and they encourage good programming practices of the
   separation between programming logic and presentation code.

   And if you're concerned about reusing blocks of code, the concerns
   about {% with %} are only relevant to Django  1.0, and the devs have
   been telling users to use SVN (which is very stable) and not 0.96 for
   MONTHS now. (Yeah, AE only supports 0.96 out-of-the-box, but that
   makes sense. Why would Google want to track SVN? I just have my own
   checkout of Django I use. And besides, Django 1.0 is due for release
   next week. I guarantee Google will support it.) And besides, I have
   never had to use {% with %}. Most code repetition I come across is
   more logically solved with block inheritance.

   I strongly recommend you upgrade to the latest Django beta and read
   the template docs. And if it really doesn't work for you, there are
   plenty of other options.

   This post is really about the problems that Google has with
   communications about where App Engine is going (and WHEN).

   On Aug 30, 4:56 am, Davide Rognoni [EMAIL PROTECTED] wrote:

Doubts about Django 
Templatehttp://groups.google.com/group/google-appengine/browse_thread/thread/...

On Aug 28, 12:09 am, javaDinosaur [EMAIL PROTECTED] wrote:

 I am starting to have doubts about continuing to develop my
 applications for GAE. My concerns are not technical although I have a
 some anxieties about transaction data propagation performance.

 My concerns center around Google’s commitment to the App Engine
 project. Compared to Amazon’s Web Service forums this place feels like
 a technical backwater. Developers hosting on Amazon AWS post
 interesting questions and get deep-dive replies promptly from Amazon
 staff. Amazon is releasing new Cloud development services monthly yet
 all we get is minor patches.

 Here on the GAE forum elementary questions about how GAE ticks go
 unanswered for months. Basic roadmap type info such as will we get SSL
 or scheduled tasks is missing.

 I just feel that the GAE Team is not building up any development
 stream in what should be the last 4 month run up to the year-end
 release. Communication with the developer community here is abysmal
 compared to the investment in developer relations made by companies
 such as Microsoft, Redhat or Amazon.

 What’s happened to the early buzz Google? Has the top bass pinched
 half the team to firefight problems on another project?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL 

[google-appengine] Re: Having doubts about AppEngine

2008-08-30 Thread Mike Orr

On Sat, Aug 30, 2008 at 2:25 PM, Davide Rognoni
[EMAIL PROTECTED] wrote:

 Not Google but:

 Guido just pronounced: Django is the [Python] web framework
 http://www.cmlenz.net/archives/2006/08/the-python-web-framework

Note that that was written in 2006.  Since then the frameworks and
template engines have remained pretty much in their same relative
positions.  An exception is Mako, which I think was first released
around that time and has now become one of the frontrunners for
non-XML-style templates.  Jinja also appeared, which I think has a
Django template-like syntax.

In order for Django and TurboGears to merge, one of them would have to
give up its founding philosophy.

-- 
Mike Orr [EMAIL PROTECTED]

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



[google-appengine] Unable to make comments on http://appengine-cookbook.appspot.com

2008-08-30 Thread noah.gift

Traceback (most recent call last):
  File /base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py, line 501, in __call__
handler.post(*groups)
  File /base/data/home/apps/appengine-cookbook/2.4/cookbook.py, line
373, in post
template_values = memcache.get(key)
  File /base/python_lib/versions/1/google/appengine/api/memcache/
__init__.py, line 384, in get
request.add_key(_key_string(key))
  File /base/python_lib/versions/1/google/appengine/api/memcache/
__init__.py, line 115, in _key_string
'received %d bytes' % (MAX_KEY_SIZE, len(server_key)))
ValueError: Keys may not be more than 250 bytes in length, received
282 bytes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Unable to make comments on http://appengine-cookbook.appspot.com

2008-08-30 Thread Bill

It's a bit ironic since the cause of that error might be mitigated by
one of the submitted recipes:
http://appengine-cookbook.appspot.com/recipe/mapping-keys-to-urls/?id=ahJhcHBlbmdpbmUtY29va2Jvb2tylgELEgtSZWNpcGVJbmRleCI8YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUZ3c1NDRU5oZEdWbmIzSjVJZ2xFWVhSaGMzUnZjbVVNDAsSBlJlY2lwZSI9YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUZ3c1NDRU5oZEdWbmIzSjVJZ2xFWVhSaGMzUnZjbVVNMgw
Might because using numeric IDs only work if you didn't store the
entities using a key name.

On Aug 30, 3:22 pm, noah.gift [EMAIL PROTECTED] wrote:
 Traceback (most recent call last):
   File /base/python_lib/versions/1/google/appengine/ext/webapp/
 __init__.py, line 501, in __call__
     handler.post(*groups)
   File /base/data/home/apps/appengine-cookbook/2.4/cookbook.py, line
 373, in post
     template_values = memcache.get(key)
   File /base/python_lib/versions/1/google/appengine/api/memcache/
 __init__.py, line 384, in get
     request.add_key(_key_string(key))
   File /base/python_lib/versions/1/google/appengine/api/memcache/
 __init__.py, line 115, in _key_string
     'received %d bytes' % (MAX_KEY_SIZE, len(server_key)))
 ValueError: Keys may not be more than 250 bytes in length, received
 282 bytes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: live debugging is horribly implemented

2008-08-30 Thread Luke Graybill
Alexander,

Thank you so much for pointing me towards the logging module. It has been a
great help, although not in solving the issue mentioned here. I was not
getting any errors in the appengine logs, as my issue was due to malformed
strings in app.yaml. Apparently the dev_appserver isn't as sensitive as the
live server, so it was functioning without complaint, and then DOA in live.

Anyhow, I still think that it's very inconvenient that the logs in the
appengine admin view don't display anything for malformed app.yaml.

Again, thanks for the tip on logging :)

Killarny

On Thu, Aug 28, 2008 at 12:45 AM, Alexander Kojevnikov 
[EMAIL PROTECTED] wrote:


 You should also see the exception info in the log if it wasn't handled
 at all.

 On Aug 28, 3:58 pm, Alexander Kojevnikov [EMAIL PROTECTED]
 wrote:
  Do you use the logging module?
 http://code.google.com/appengine/docs/python/logging.html
 
  You can try/except your code like this:
 
  try:
  code_that_can_fail()
  except:
  logging.error('your_message', exc_info=sys.exc_info())
 
  You will then see the full exception information, including the stack
  trace in the admin console / logs.
 
  On Aug 28, 2:31 pm, Killarny [EMAIL PROTECTED] wrote:
 
   It is very frustrating that the dev_appserver will validate and run
   code that does not run on the live server. Even more frustrating is
   that the live server doesn't provide a way to view python traceback to
   determine what the actual problem is.
 
   Does anyone know of a technique that I can use to debug my live
   server, other than trial and error updates? I'm getting a mysterious
   500 server error with my code, but the code runs perfectly under
   dev_appserver!
 
   Frustrated,
 
   Killarny
 


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



[google-appengine] Re: live debugging is horribly implemented

2008-08-30 Thread Alexander Kojevnikov

 Thank you so much for pointing me towards the logging module.

No worries, I too learned about it just a few days ago :)

 Apparently the dev_appserver isn't as sensitive as the
 live server, so it was functioning without complaint, and then DOA in live.

 Anyhow, I still think that it's very inconvenient that the logs in the
 appengine admin view don't display anything for malformed app.yaml.

I suggest adding an issue into the bug tracking system with a sample
app.yaml that reproduces this problem. IMO, the SDK should behave
as close as possible to the live version of GAE. And in any case
such errors should be logged.

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



[google-appengine] Re: Weird GQL Query Bug

2008-08-30 Thread bin

I experienced the same problem regarding this problem, then I tried to
iterate over the results and increment the count one by one but this
obviously trigger :

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

is there any workaround that doesn't trigger CPU warning?



On Jul 25, 7:55 am, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Thanks for the report, I've brought the issue to the attention of our
 engineering team.

 -Marzia

 On Thu, Jul 24, 2008 at 6:57 AM, Abel Rodriguez [EMAIL PROTECTED]
 wrote:

  @afrobeard

  I put my comment to your report, thanks,

  2008/7/24 afrobeard [EMAIL PROTECTED]:

  @Abel

  I filed the bug up on:-

 http://code.google.com/p/googleappengine/issues/detail?id=586sort=-i...

  You can raise the number of stars or comment on it there. More stars
  means that google should hopefully solve it first.

  On Jul 24, 4:46 am, Nevin Freeman [EMAIL PROTECTED] wrote:
   I don't think this is actually a bug. In the first example you give,
   you never actually preform the query. See:
 http://code.google.com/appengine/docs/datastore/creatinggettinganddel...
   (the part under Executing the Query and Accessing Results)

   You can execute the query by calling query_name.fetch(), or by
   iterating over it (AppEngine automatically executes the query). Your
   second example invokes that behavior with the for a in r: part. If
   you were to do:

   r = db.GqlQuery(SELECT * FROM Mojo WHERE keywords IN :1,
   ['pakistan',
   'punjab'])
   r.fetch(50)
   print r.count()

   I think it might work.

   Nevin

   On Jul 22, 7:38 am, afrobeard [EMAIL PROTECTED] wrote:

I'm making a model with a string list in it:-

class Mojo(db.Model):
    keywords = db.StringListProperty()

Then I added an Instance:-

m = Mojo(keywords = ['punjab','pakistan'])
m.put()

After which I executed the following lines of code:-

r = db.GqlQuery(SELECT * FROM Mojo WHERE keywords IN :1,['pakistan',
'punjab'])
print r.count()

to which I got the following error message:-

Traceback (most recent call last):
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\admin\__init__.py, line 180, in post
    exec(compiled_code, globals())
  File string, line 6, in module
  File C:\Program Files\Google\google_appengine\google\appengine\ext
\db\__init__.py, line 1276, in count
    return self._get_query().Count(limit=limit)
  File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py, line 951, in Count
    self._ToPb(limit=limit), resp)
  File C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py, line 1104, in _ToPb
    pb.set_kind(self.__kind.encode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'encode'

However if I execute this :-

r = db.GqlQuery(SELECT * FROM Mojo WHERE keywords IN :1,['pakistan',
'punjab'])

for a in r:
    print a.keywords

I get :-

[u'punjab',u'pakistan']
[u'punjab',u'pakistan']
[u'punjab',u'pakistan']

Note:-
This is the simplest repro done using the interactive console.
The same behavior is also exhibited when everything is put on google's
server and not executed from dev_appserver.py

This shouldn't come up, any idea how we can get Google to correct his
behavior ?


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



[google-appengine] .8 release of appengine-utilities, a better cache and more event triggers

2008-08-30 Thread [EMAIL PROTECTED]

http://gaeutilities.appspot.com/

New cache is the major feature of this release. It uses both the
datastore and memcache much like session. It also has been refactored
to act as a django cache backend. The latest release of django has the
ability to plug in custom caching backends. Also, both cache and
sessions have had multiple event triggers added.

If anyone has any feature requests, this is the week to get them in.
I'm going to be working on documentation before a 1.0beta. Once the
beta goes up, the libraries will be feature frozen and only bugs will
be worked on for a 1.0 release.

changelog

 - cache: A lot of refactoring, preparing it for use as a drop in
cache backend for django.
 - cache: uses memcache in addition to the datastore
 - demo: added memcache stats to the demo
 - demo: updated demo to include deleting a cache object
 - cache: passed the pep8 test
 - event: passed the pep8 test
 - sessions: sessionDelete event changed to sessionDeleted
 - sessions: sessionInititalized, sessionGetFromDatastore,
sessionDataGetFromDatastore, sessionDataPut,
sessionDataGetFromMemcache, sessionMemcacheUpdated events added.
 - cache: cacheInitialized, cacheAdd, cacheSet,
cacheReadFromDatastore, cacheReadFromMemcache, cacheRead, cacheDeleted
events added.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---