[google-appengine] Re: join group-by queries, reports and data warehousing

2009-05-06 Thread bruno.braga

No doubt. You got my star on it!

On May 6, 9:20 pm, Barry Hunter  wrote:
> This would go a long way to facilitate data warehousing type 
> taskshttp://code.google.com/p/googleappengine/issues/detail?id=112
>
> add your star to support it :)
>
> On 06/05/2009, bruno.braga  wrote:
>
>
>
>
>
> >  Hi Ryan,
>
> >  Thanks for the quick reply, and for clarifying this to me, even if
> >  those are not good news to me.
>
> >  If complex reporting system is required, I think it is reasonable
> >  enough to count on third-part solutions (even you own) to do that, and
> >  do not get away from the purpose of GAE. I will think of something on
> >  how to manage that on my end.
>
> >  Just a thought though, as this service spreads, more and more people
> >  will require this kind of things, because it would just be so cool to
> >  leave the reporting integrated in a single solution.
>
> >  Thinking about a third-party solution, we could also do something
> >  stupid as downloading the datastore data (let's say, on a daily basis,
> >  and only incremental to avoid spending all available quota on this),
> >  processing all data mining required and uploading back to datastore.
> >  Dirty, but sounds like a solution.
>
> >  Thanks anyway for your help!
>
> >  On May 6, 3:12 am, ryan  wrote:
> >  > hi bruno! thanks for the post, this is a great question.
>
> >  > the short answer is that the datastore simply doesn't support data
> >  > warehouse or data mining well. it's doable, but far from ideal, for
> >  > the reasons you've mentioned. it's aimed at serving webapps, which
> >  > it's good at, but not at ad hoc reports or queries.
>
> >  > for use cases like counters, if they're needed for end user requests,
> >  > we usually recommend updating them on writes, as you mentioned, but
> >  > you're right that that doesn't work for the arbitrary number of
> >  > reports or queries that data warehouses traditionally support, nor
> >  > does it work for the ad hoc queries often needed for data mining and
> >  > business intelligence.
>
> >  > right now, if you need an industrial strength data warehouse, i'd
> >  > recommend bulk downloading your data and using a third party solution.
>
> --
> Barry
>
> -www.nearby.org.uk-www.geograph.org.uk-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: You haven't set the DATABASE_ENGINE setting yet

2009-05-06 Thread ryan

just for the record, DATABASE_ENGINE is a django thing, not an app
engine thing.

(that's as much as i can help, since i don't really know anything
about django.)

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



[google-appengine] Silicon Valley App Engine meetup next *Wednesday*, May 13.

2009-05-06 Thread Bill

For those of you in the northern California area, we have an App
Engine developer meetup in Palo Alto next Wednesday.  I mistakenly
wrote Tuesday in a previous message.

For more details see:
http://www.meetup.com/appengine/calendar/10183312/

This meetup will mostly be other developers giving demos of their
work
on App Engine and discussing code/issues.


--~--~-~--~~~---~--~~
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: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

Alternativaly can I just clear the cache?

Thanks for the support!

On May 6, 10:48 pm, ryan  wrote:
> sorry for the trouble, all, this is our fault. we're canarying the
> upcoming 1.2.2 release, and it looks like entities that were memcached
> from 1.2.1 aren't compatible with 1.2.2. we're investigating and
> working on a fix right now.
>
> as a short term workaround, try adding this line after you pull an
> entity e (an instance of a Model or Expando subclass) out of memcache:
>
>   e._entity = None
>
> that will force it to rebuild its inner datastore.Entity instance,
> which might prevent the error.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread ryan

sorry for the trouble, all, this is our fault. we're canarying the
upcoming 1.2.2 release, and it looks like entities that were memcached
from 1.2.1 aren't compatible with 1.2.2. we're investigating and
working on a fix right now.

as a short term workaround, try adding this line after you pull an
entity e (an instance of a Model or Expando subclass) out of memcache:

  e._entity = None

that will force it to rebuild its inner datastore.Entity instance,
which might prevent the error.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

The situation is still critical.
/shoot
604 70%
/getfleet
18  2%

There was a small window of time that the error seemed to be gone.
The actual time is indicated at my previous posts, when I said it was
working
a few minutes after posting the error returned... and is still here.

Any tips? what can I do? (besides putting a msg to the users saying:
 "The servers are facing technical problems, please try again later"

On May 6, 3:17 pm, DarkCoiote  wrote:
> My app is not that popular and my error % are really higher:
> /shoot
>         203     53%
> /getfleet
>         11      2%
>
> And the /shoot url is almost the most used/important.
>
> app_id=naval-war
>
> if you need...
>
> Please, fix it! Thanks alot!
>
> On May 6, 12:43 pm, Ben Nevile  wrote:
>
> > I am getting the same bug. 950 times, so almost 0% of the 323.35k
> > requests for that handler served since midnight. but a bug
> > nonetheless.
>
> > Nothing too complicated is happening. An entity is being loaded into
> > memory, through a standard memcache call that falls back to a
> > datastore call.  The values are being updated, then a put() is
> > called.  It's on the put() that I'm seeing the error.
>
> > Here's the trace:
>
> > Traceback (most recent call last):
> >   File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > __init__.py", line 501, in __call__
> >     handler.get(*groups)
> >   File "controllers/rankings.py", line 114, in get
> >     friend_team.put()
> >   File "models/team.py", line 31, in put
> >     db.Model.put(self)
> >   File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 695, in put
> >     return datastore.Put(self._entity)
> >   File "/base/python_lib/versions/1/google/appengine/api/
> > datastore.py", line 155, in Put
> >     req.entity_list().extend([e._ToPb() for e in entities])
> >   File "/base/python_lib/versions/1/google/appengine/api/
> > datastore.py", line 513, in _ToPb
> >     name in self.__unindexed_properties):
> > AttributeError: 'Entity' object has no attribute
> > '_Entity__unindexed_properties'
>
> > Ben
>
> > On May 6, 5:19 am, DarkCoiote  wrote:
>
> > > Doing some more tests, and now the requests handler that
> > > I was testing stopped giving errors...
>
> > > My best guess is that someone (you?) is fixing the bug.
> > > My fears is that the bug is really nasty and difficult to find/
> > > reproduce and mutable.
>
> > > Anyway, thanks a lot!
>
> > > On May 6, 9:11 am, DarkCoiote  wrote:
>
> > > > Actually, the problem still exists... it is only occurring in others
> > > > requests handlers...
>
> > > > And the new point of error is also a updating put
>
> > > > What does this error actually means?
>
> > > > On May 6, 9:00 am, DarkCoiote  wrote:
>
> > > > > Well, It was working before, and now is working again!
>
> > > > > Actually, theentityis being updated. But here is the code anyway
>
> > > > >   person = get_person(owner)
> > > > >     if person is None:
> > > > >       self.response.out.write(minjson.write(None))
> > > > >       return
>
> > > > >     # converting to dict()                        - to do a
> > > > > json.write at the end: is there a json.write to datastore models?
> > > > >     tmpPerson['id'] = person.id
> > > > >     
> > > > >     tmpPerson['shipsLost'] = person.shipsLost
>
> > > > >     # update access and reload
> > > > >     if owner == viewer:
> > > > >         person.name = urllib.unquote(self.request.get('name'))
> > > > >         person.rank = get_rank(person.score, person.rank)
> > > > >   Crazy math to get some new numbers
> > > > >         now = datetime.now() + timedelta(hours=-3)
> > > > >         ..
> > > > >         reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
> > > > > # 2 per hour
>
> > > > >         person.lastAccess = datetime.now()
>
> > > > >         person.availableShots = person.availableShots + reloadShots
> > > > >         if person.availableShots > person.maxShots:
> > > > >           person.availableShots = person.maxShots
> > > > >         if person.availableShots < 0:
> > > > >           person.availableShots = 0
>
> > > > >         person.put()
>
> > > > > I guess is all simple stuff that should not give any errors (as it
> > > > > didn't give before and is not giving now)
>
> > > > > Thanks a lot for the quick - almost instant - reply
>
> > > > > On May 6, 7:10 am, "Nick Johnson (Google)" 
> > > > > wrote:
>
> > > > > > Hi,
>
> > > > > > Can you please paste the code showing how you are constructing the
> > > > > >entityyou're trying to put?
>
> > > > > > -Nick Johnson
>
> > > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  
> > > > > > wrote:
>
> > > > > > > All of sudden I started getting this error for all of the request 
> > > > > > > to
> > > > > > > app. that requires datastore puts.
>
> > > > > > > Someonehastweaked something. lol
>
> > > > > > > The full log:
>
> > > > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_

[google-appengine] Re: Error 400: app engine + custom domain + /search?q=a|b|c

2009-05-06 Thread Tag++

To Wooble,

I can't separate bad from error,fault or wrong results, as a normal/
general/ordinary user I just click on this link to open it

http://admins.googleapps.com/system/app/pages/search?q=error|400

I got a correct/exact/right results and then I focus on browser's
address box and press return to refresh, then I got a different
correct/exact/right results!!!

I use Firefox and Chrome browser, should I copy this post to Firefox
or Chrome group?


--~--~-~--~~~---~--~~
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] Show "processing" message to user while Urlfetch works

2009-05-06 Thread Jim

I have a function that goes and looks up some data.   I'd like to say
something to the user after they click submit but before I have any
results.

I've tried HttpResponse with response.write as well as
self.response.out.write

The problem with both of them is that they wait until the function is
done before they output anything.   Saying "I'm starting the lookup"
doesn't work so well when they see it after the fact ...

I've done about 90 minutes of Googling and looking at the Django docs
and am coming up empty.

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] Silicon Valley App Engine developer meetup - Tuesday, May 13, 7 pm

2009-05-06 Thread Bill

For those of you in the northern California area, we have an App
Engine developer meetup in Palo Alto next Tuesday.  For more details
see:
http://www.meetup.com/appengine/calendar/10183312/

This meetup will mostly be other developers giving demos of their work
on App Engine and discussing code/issues.
--~--~-~--~~~---~--~~
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 (500) when using Data Viewer to query datastore.

2009-05-06 Thread Adam Loving

I am consistently getting 500 errors when executing valid GQL queries
to the datastore using the Data Viewer in the admin site. Some queries
work, but others do not. The queries are very simple lookups. For
example:

SELECT * FROM Group where founder ='CHBlockParty'

Google formatted error page reads: "A server error has occurred".

This makes me worry that I may have corrupt indexes. However, I
believe all queries are working when executed through app code.

My app name is twitter-sync.

Any advice greatly appreciated.

Thanks,
Adam
--~--~-~--~~~---~--~~
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: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

My app is not that popular and my error % are really higher:
/shoot
203 53%
/getfleet
11  2%

And the /shoot url is almost the most used/important.

app_id=naval-war

if you need...


Please, fix it! Thanks alot!

On May 6, 12:43 pm, Ben Nevile  wrote:
> I am getting the same bug. 950 times, so almost 0% of the 323.35k
> requests for that handler served since midnight. but a bug
> nonetheless.
>
> Nothing too complicated is happening. An entity is being loaded into
> memory, through a standard memcache call that falls back to a
> datastore call.  The values are being updated, then a put() is
> called.  It's on the put() that I'm seeing the error.
>
> Here's the trace:
>
> Traceback (most recent call last):
>   File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 501, in __call__
>     handler.get(*groups)
>   File "controllers/rankings.py", line 114, in get
>     friend_team.put()
>   File "models/team.py", line 31, in put
>     db.Model.put(self)
>   File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 695, in put
>     return datastore.Put(self._entity)
>   File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 155, in Put
>     req.entity_list().extend([e._ToPb() for e in entities])
>   File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 513, in _ToPb
>     name in self.__unindexed_properties):
> AttributeError: 'Entity' object has no attribute
> '_Entity__unindexed_properties'
>
> Ben
>
> On May 6, 5:19 am, DarkCoiote  wrote:
>
> > Doing some more tests, and now the requests handler that
> > I was testing stopped giving errors...
>
> > My best guess is that someone (you?) is fixing the bug.
> > My fears is that the bug is really nasty and difficult to find/
> > reproduce and mutable.
>
> > Anyway, thanks a lot!
>
> > On May 6, 9:11 am, DarkCoiote  wrote:
>
> > > Actually, the problem still exists... it is only occurring in others
> > > requests handlers...
>
> > > And the new point of error is also a updating put
>
> > > What does this error actually means?
>
> > > On May 6, 9:00 am, DarkCoiote  wrote:
>
> > > > Well, It was working before, and now is working again!
>
> > > > Actually, theentityis being updated. But here is the code anyway
>
> > > >   person = get_person(owner)
> > > >     if person is None:
> > > >       self.response.out.write(minjson.write(None))
> > > >       return
>
> > > >     # converting to dict()                        - to do a
> > > > json.write at the end: is there a json.write to datastore models?
> > > >     tmpPerson['id'] = person.id
> > > >     
> > > >     tmpPerson['shipsLost'] = person.shipsLost
>
> > > >     # update access and reload
> > > >     if owner == viewer:
> > > >         person.name = urllib.unquote(self.request.get('name'))
> > > >         person.rank = get_rank(person.score, person.rank)
> > > >   Crazy math to get some new numbers
> > > >         now = datetime.now() + timedelta(hours=-3)
> > > >         ..
> > > >         reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
> > > > # 2 per hour
>
> > > >         person.lastAccess = datetime.now()
>
> > > >         person.availableShots = person.availableShots + reloadShots
> > > >         if person.availableShots > person.maxShots:
> > > >           person.availableShots = person.maxShots
> > > >         if person.availableShots < 0:
> > > >           person.availableShots = 0
>
> > > >         person.put()
>
> > > > I guess is all simple stuff that should not give any errors (as it
> > > > didn't give before and is not giving now)
>
> > > > Thanks a lot for the quick - almost instant - reply
>
> > > > On May 6, 7:10 am, "Nick Johnson (Google)" 
> > > > wrote:
>
> > > > > Hi,
>
> > > > > Can you please paste the code showing how you are constructing the
> > > > >entityyou're trying to put?
>
> > > > > -Nick Johnson
>
> > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  
> > > > > wrote:
>
> > > > > > All of sudden I started getting this error for all of the request to
> > > > > > app. that requires datastore puts.
>
> > > > > > Someonehastweaked something. lol
>
> > > > > > The full log:
>
> > > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_properties'
> > > > > > Traceback (most recent call last):
> > > > > >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > > > > __init__.py", line 501, in __call__
> > > > > >    handler.get(*groups)
> > > > > >  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> > > > > > line 268, in get
> > > > > >    person.put()
> > > > > >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > > > __init__.py", line 695, in put
> > > > > >    return datastore.Put(self._entity)
> > > > > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > > > > datastore.py", line 155, in Put
> > > > > >    req.entity_list().extend([e._ToPb() for e in 

[google-appengine] Re: Error 400: app engine + custom domain + /search?q=a|b|c

2009-05-06 Thread Wooble



On May 5, 8:45 pm, Stephen  wrote:
> > Google's servers returning a 400 for URLs containing an unescaped |
> > character is not a bug in the server - they're correctly obeying the
> > relevant RFCs.
>
> By this definition, you are claiming that the main google.com search
> server is wrong, because it does not refuse to accept raw pipe
> characters.
>
> Certainly, one set of Google servers are wrong, because there are two
> different behaviours.

Accepting a badly-formed URL and doing what the user expects is not
wrong.  Not accepting a badly-formed URL is also not wrong. Sending a
badly-formed URL and expecting consistent behavior is, however, 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: documentation for memcache namespaces?

2009-05-06 Thread Andy Freeman

That sentence is in the section that lists the functions that have no
meaning/for compatibility.

In the listing of functions that have meaning, various arguments are
listed as having no meaning/for compatibility but namespace isn't one
of those arguments.

On May 5, 4:00 pm, djidjadji  wrote:
> It says: To be compatible with other memcache implementations they
> allow parameters and functions that have no meaning
--~--~-~--~~~---~--~~
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: filter on many to many reference collections

2009-05-06 Thread djidjadji

friends = user.friends

This is a query for "Connections" objects.

Other method of writing

user = User.get_by_id(uid)
Connections.all().filter('friend =', user)  # user.friends

>for friend in friends:
>print friend.user.key().id()
This will perform a query to fetch one (1) User object for every
friend(=type Connections) object.

> query = user.friends.filter('__key__', db.Key.from_path
> ('User',uid)).get()
This will always be None because there is no Connections object with a
key of a User object.

2009/5/6 Dave :
>
> Hi All, I just can seem to figure out the magic to make this work.
> Appreciate any guidance.
>
> I have the following models:
>
> Class User(db.Model)
> name = db.StringProperty()
> ...
>
> Class Connections(db.Model)
> user = db.ReferenceProperty(User, collection_name='users'
> friend = db.ReferenceProperty(User, collection_name='friends'
>
> and then I can do:
>
> user = User.get_by_id(uid)
> friends = user.friends
> for friend in friends:
>   print friend.user.key().id()
>
> and it works well What I can't figure out is how to filter such as
> below.
>
> query = user.friends.filter('__key__', db.Key.from_path
> ('User',uid)).get()
> (may be used to check for a duplicate connection)
> or
> query = user.friends.filter('email =', u...@blah.com).fetch()
> (grab friends email address...)
>
> Any help is greatly appreciated!
>
> Dave

--~--~-~--~~~---~--~~
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] Will a transcript of the IRC chat be published?

2009-05-06 Thread tommytastic

I missed the session ;-(

--~--~-~--~~~---~--~~
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: structure of appengine application

2009-05-06 Thread Panos

I have found a structure along the following lines pretty useful for
the python based apps:

app.yaml
index.yaml
app/
   controllers/
  A_ctl.py
  B_ctl.py
 ...
   models/
  A.py
  B.py
 ...
   util/
 ...
   templates/
 foo.html
 ...
   javascript/
 ...
   images/
 ...
platform/
   controllers/
  C_ctl.py
  D_ctl.py
 ...
   models/
  C.py
  D.py
 ...
   util/
   ...

As you see I put one model and one controller in each file. In the
platform, I put code that could be useful in other apps as well. In
fact platform could be a symbolic link to code shared by multiple
apps.

I hope this helps a little bit.

--Panos

On May 5, 8:22 pm, Pranav Prakash  wrote:
> You can look at following resources and their source code to under
> stand more
>
> * OpenSource projects on 
> AppEnginehttp://groups.google.com/group/google-appengine/web/google-app-engine...
>
> * Google AppEngine's Sample 
> Appshttp://code.google.com/p/google-app-engine-samples/
>
> * AppEngine cookbookhttp://appengine-cookbook.appspot.com
>
> --
> Regards,
> Pranav Prakash
>
> "This life is more than ordinary"
>
> On May 6, 2:48 am, Rishtal  wrote:
>
> > Hi,
>
> > First of all, I'd like to say i've learned a lot in this group. Thanks
> > for all the great insight.
>
> > I am developing a web app and wanted to know what is the best way to
> > structure my development. I want to get the data/schemas done first.
>
> > I've started to write my models.py. But how to write views.py and
> > urls.py to correlate with my models.py? Can you show me any examples
> > of structuring my schema, views.py, or urls.py. Basically do you have
> > any examples of views.py or urls.py.
>
> > What are the best practices to start writing a web app? i've done all
> > the wireframing and diagramming as well.
>
> > Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: You haven't set the DATABASE_ENGINE setting yet

2009-05-06 Thread Albert

It is a very weird error, you know , It just don't happen all the
time, but if I trigger /service/bbs/ (a django gateway for PYAMF) and
the service is not completed, I got my whole site down and all errors
were about DATABASE_ENGINE setting etc, and after a while it recovers
automatically

If you know the problem ,please do let me know, thanks

#
/service/bbs/ 500 187ms 33cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows
NT 6.0; zh-CN; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR
3.5.30729),gzip(gfe)
See details

202.120.40.90 - - [06/May/2009:09:01:49 -0700] "POST /service/bbs/
HTTP/1.1" 500 0 "http://bbstop10.appspot.com/page/BbsRender.swf";
"Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.10) Gecko/
2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729),gzip(gfe)"

#
E 05-06 09:01AM 49.359

: You haven't set
the DATABASE_ENGINE setting yet.
Traceback (most recent call last):
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 71, in 
main()
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 68, 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/python_lib/versions/1/django/db/__init__.py", line 47,
in _rollback_on_exception
transaction.rollback_unless_managed()
  File "/base/python_lib/versions/1/django/db/transaction.py", line
145, in rollback_unless_managed
connection._rollback()
  File "/base/python_lib/versions/1/django/db/backends/dummy/base.py",
line 13, in complain
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE
setting yet."



#
/list/ 500 30ms 44cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.0;
zh-CN; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR
3.5.30729),gzip(gfe)
See details

202.120.40.90 - - [06/May/2009:09:03:36 -0700] "GET /list/ HTTP/1.1"
500 0 "http://bbstop10.appspot.com/?
origin=103&xn_sig_in_iframe=1&xn_sig_method=get&xn_sig_time=1241625811291&xn_sig_added=1&xn_sig_user=228993921&xn_sig_session_key=2.7e653581969961021b70c96921e5c7ac.
3600.1241632800-228993921&xn_sig_expires=0&xn_sig_api_key=fbd740bc879045e6938f023225c1c8b2&xn_sig_app_id=29481"
"Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.10) Gecko/
2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729),gzip(gfe)"

#
E 05-06 09:03AM 36.186

: You haven't set
the DATABASE_ENGINE setting yet.
Traceback (most recent call last):
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 71, in 
main()
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 68, 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/python_lib/versions/1/django/db/__init__.py", line 47,
in _rollback_on_exception
transaction.rollback_unless_managed()
  File "/base/python_lib/versions/1/django/db/transaction.py", line
145, in rollback_unless_managed
connection._rollback()
  File "/base/python_lib/versions/1/django/db/backends/dummy/base.py",
line 13, in complain
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE
setting yet."


--~--~-~--~~~---~--~~
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: You haven't set the DATABASE_ENGINE setting yet

2009-05-06 Thread Albert

I am getting the exact the same error, under python runtime
when I check the log , I got pages of such errors, I know nothing
about this ,
seeming that if I set DEBUG = TRUE will decrease such errors but I am
not sure of this
stack trace:
: You haven't set
the DATABASE_ENGINE setting yet.
Traceback (most recent call last):
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 71, in 
main()
  File "/base/data/home/apps/bbstop10/1.333251275883085776/
django_bootstrap.py", line 68, 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/python_lib/versions/1/django/db/__init__.py", line 47,
in _rollback_on_exception
transaction.rollback_unless_managed()
  File "/base/python_lib/versions/1/django/db/transaction.py", line
145, in rollback_unless_managed
connection._rollback()
  File "/base/python_lib/versions/1/django/db/backends/dummy/base.py",
line 13, in complain
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE
setting yet."
--~--~-~--~~~---~--~~
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: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread Ben Nevile

I am getting the same bug. 950 times, so almost 0% of the 323.35k
requests for that handler served since midnight. but a bug
nonetheless.

Nothing too complicated is happening. An entity is being loaded into
memory, through a standard memcache call that falls back to a
datastore call.  The values are being updated, then a put() is
called.  It's on the put() that I'm seeing the error.

Here's the trace:

Traceback (most recent call last):
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 501, in __call__
handler.get(*groups)
  File "controllers/rankings.py", line 114, in get
friend_team.put()
  File "models/team.py", line 31, in put
db.Model.put(self)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 695, in put
return datastore.Put(self._entity)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 155, in Put
req.entity_list().extend([e._ToPb() for e in entities])
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 513, in _ToPb
name in self.__unindexed_properties):
AttributeError: 'Entity' object has no attribute
'_Entity__unindexed_properties'



Ben




On May 6, 5:19 am, DarkCoiote  wrote:
> Doing some more tests, and now the requests handler that
> I was testing stopped giving errors...
>
> My best guess is that someone (you?) is fixing the bug.
> My fears is that the bug is really nasty and difficult to find/
> reproduce and mutable.
>
> Anyway, thanks a lot!
>
> On May 6, 9:11 am, DarkCoiote  wrote:
>
>
>
> > Actually, the problem still exists... it is only occurring in others
> > requests handlers...
>
> > And the new point of error is also a updating put
>
> > What does this error actually means?
>
> > On May 6, 9:00 am, DarkCoiote  wrote:
>
> > > Well, It was working before, and now is working again!
>
> > > Actually, theentityis being updated. But here is the code anyway
>
> > >   person = get_person(owner)
> > >     if person is None:
> > >       self.response.out.write(minjson.write(None))
> > >       return
>
> > >     # converting to dict()                        - to do a
> > > json.write at the end: is there a json.write to datastore models?
> > >     tmpPerson['id'] = person.id
> > >     
> > >     tmpPerson['shipsLost'] = person.shipsLost
>
> > >     # update access and reload
> > >     if owner == viewer:
> > >         person.name = urllib.unquote(self.request.get('name'))
> > >         person.rank = get_rank(person.score, person.rank)
> > >   Crazy math to get some new numbers
> > >         now = datetime.now() + timedelta(hours=-3)
> > >         ..
> > >         reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
> > > # 2 per hour
>
> > >         person.lastAccess = datetime.now()
>
> > >         person.availableShots = person.availableShots + reloadShots
> > >         if person.availableShots > person.maxShots:
> > >           person.availableShots = person.maxShots
> > >         if person.availableShots < 0:
> > >           person.availableShots = 0
>
> > >         person.put()
>
> > > I guess is all simple stuff that should not give any errors (as it
> > > didn't give before and is not giving now)
>
> > > Thanks a lot for the quick - almost instant - reply
>
> > > On May 6, 7:10 am, "Nick Johnson (Google)" 
> > > wrote:
>
> > > > Hi,
>
> > > > Can you please paste the code showing how you are constructing the
> > > >entityyou're trying to put?
>
> > > > -Nick Johnson
>
> > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  
> > > > wrote:
>
> > > > > All of sudden I started getting this error for all of the request to
> > > > > app. that requires datastore puts.
>
> > > > > Someonehastweaked something. lol
>
> > > > > The full log:
>
> > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_properties'
> > > > > Traceback (most recent call last):
> > > > >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > > > __init__.py", line 501, in __call__
> > > > >    handler.get(*groups)
> > > > >  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> > > > > line 268, in get
> > > > >    person.put()
> > > > >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > > __init__.py", line 695, in put
> > > > >    return datastore.Put(self._entity)
> > > > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > > > datastore.py", line 155, in Put
> > > > >    req.entity_list().extend([e._ToPb() for e in entities])
> > > > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > > > datastore.py", line 513, in _ToPb
> > > > >    name in self.__unindexed_properties):
> > > > > AttributeError: 'Entity'objecthasnoattribute
> > > > > '_Entity__unindexed_properties'
>
> > > > > Line of main.py 268:
> > > > >  person.put()
>
> > > > > Person model:
>
> > > > > class Person(db.Model):
> > > > >  id = db.StringProperty()
> > > > >  name = db.StringProperty(default="") 

[google-appengine] Re: I have my Google Apps domain - under the hood is Appengine. How do I get the appengine domain?

2009-05-06 Thread richardcur...@googlemail.com

I guess this will stay there forever and ever? and not disappear
suddenly?

On May 6, 4:10 pm, "Nick Johnson (Google)" 
wrote:
> Actually, scratch my last. You can access your application's ID with
> os.environ['APPLICATION_ID'].
>
> -Nick Johnson
>
> On Wed, May 6, 2009 at 3:09 PM, Nick Johnson (Google)
>
>  wrote:
> > Hi Ricky,
>
> > Unfortunately, there's no way to do this, short of encoding your app
> > ID in your application's configuration.
>
> > -Nick Johnson
>
>
--~--~-~--~~~---~--~~
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 PyCrypto

2009-05-06 Thread Devel63

Thanks, Nick!

On May 6, 3:29 am, "Nick Johnson (Google)" 
wrote:
> On Tue, May 5, 2009 at 11:25 PM, Devel63  wrote:
>
> > Has anyone used PyCrypto successfully with App Engine (http://
> > code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)?
> > I've run into 2 obstacles -
>
> > 1) Since there's no distribution with App Engine SDK, does anyone know
> > a safe source of the library for use on a Windows development machine?
>
> Install easy_install:http://peak.telecommunity.com/DevCenter/EasyInstall
>
> Then issue the command "easy_install pycrypto"
>
>
>
> > 2) Trying to use it onhttp://shell.appspot.com, I get errors
>
> >    from Crypto.Cipher import DES
> >    obj=DES.new('abcdefgh', DES.MODE_ECB)
>
> >     -->all sorts of traceback errors mentioning pickling
>
> As I said in your other thread, shell.appspot.com uses pickle to
> persist data between requests. This is not an issue with usage inside
> your app.
>
> -Nick Johnson
--~--~-~--~~~---~--~~
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] Traffic stats with Google Analytics and Alexa.com

2009-05-06 Thread richardcur...@googlemail.com

Hi,

I have a domain example.com with many appspots under the hood. All
hosted as subdomains.

All include the same Google Analytics script to count traffic pointing
to example.com

I wonder if Google Analytics and especially Alexa.com will attribute
all traffic going to those subdomains to example.com ???
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Building a new index is taking way too long

2009-05-06 Thread Ubaldo Huerta

I'm having same issue. Index building, for a alpha app at this moment
(just 100 entities), and it's stuck building index. Sounds like one
has to factor in this lag time in the development cycle, that is,
first update index definitions, wait wait and wait, then upload the
app (well, if one uses versions, can conceivably promote the version
to be the default one when index building has finished )

An indication of how many people are ahead in the queue or better yet
(expected duration although I realize that it can be hard to
estimate), email notification when it's done, adding more "workers",
would be nice. In any case, the message that version is ready to start
serving upon upload is misleading. version might be capable of serving
http requests, but it all indexes in index.yaml  aren't built you
should get a warning at least

On a separate note, vacuum_indexes more often than not, hangs. Well,
maybe it isn't hung, but it appears so, because output just says
Fetching index definitions diff, and stale indexes still show in the
console.



On May 1, 2:02 am, "Jason (Google)"  wrote:
> Hi Alex. We definitely need to (and will) document this better, but index
> build time is not directly proportional to the number of entities in the
> datastore but to the number of other applications who are building indexes
> at the same time. Since index building is managed by a fixed number of
> "workers," your application's indexes will take longer to build if there are
> a higher number of applications building indexes. It appears that this
> particular issue affected a number other developers earlier in the week.
> We'll take a closer look at this problem and how it can be better mitigated
> going forward, but it should be fairly uncommon for the most part.
>
> - Jason
>
> On Mon, Apr 27, 2009 at 11:30 PM, Alex Popescu <
>
> the.mindstorm.mailingl...@gmail.com> wrote:
>
> > Is there any status update on this issue? I have noticed other posts
> > on the list speaking about the same problem.
>
> > ./alex
>
> > On Apr 27, 2:59 pm, Alex Popescu 
> > wrote:
> > > Hi,
>
> > > I have defined a new index for an entity based on a datetime and 1char
> > > string property. Currently there are only 58 such entities in the
> > > datastore and after 1h15min it is still not ready. I do not see any
> > > reasons why building the index for such a small amount of entities
> > > would take such a long time, except a problem with the backend.
>
> > > The application id: dailycloud.
>
> > > ./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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: I have my Google Apps domain - under the hood is Appengine. How do I get the appengine domain?

2009-05-06 Thread Nick Johnson (Google)

Actually, scratch my last. You can access your application's ID with
os.environ['APPLICATION_ID'].

-Nick Johnson

On Wed, May 6, 2009 at 3:09 PM, Nick Johnson (Google)
 wrote:
> Hi Ricky,
>
> Unfortunately, there's no way to do this, short of encoding your app
> ID in your application's configuration.
>
> -Nick Johnson
>

--~--~-~--~~~---~--~~
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: I have my Google Apps domain - under the hood is Appengine. How do I get the appengine domain?

2009-05-06 Thread Nick Johnson (Google)

Hi Ricky,

Unfortunately, there's no way to do this, short of encoding your app
ID in your application's configuration.

-Nick Johnson

--~--~-~--~~~---~--~~
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] I have my Google Apps domain - under the hood is Appengine. How do I get the appengine domain?

2009-05-06 Thread richardcur...@googlemail.com

Hi,

I have a domain example.com which actually has spot.appspot.com under
the hood.

I now want to know the appspot-domain inside appengine from pyhton
code. Things like self.host_url return example.com.

What I want is spot.appspot.com

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



[google-appengine] Re: How to iterate a json string using dictionary

2009-05-06 Thread ray

Arnie,
I'm assuming you want to iterate over the json in Python?

Once you get the json string converted to a Python dictionary using
simplejson, you can use the dictionary's iteritems() method to iterate
over it in a python forloop like so:


from django.utils import simplejson

#jsonStr is your json string in Python
#convert to dict using simplejson:

jsonAsDict = simplejson.loads( jsonStr )
#jsonAsDict is now a python dict object

for i in jsonAsDict.iteritems():
   i[0] #is the key
   i[1] #is the value

Hope that helps.

--~--~-~--~~~---~--~~
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: join group-by queries, reports and data warehousing

2009-05-06 Thread Barry Hunter

This would go a long way to facilitate data warehousing type tasks
http://code.google.com/p/googleappengine/issues/detail?id=112

add your star to support it :)



On 06/05/2009, bruno.braga  wrote:
>
>  Hi Ryan,
>
>  Thanks for the quick reply, and for clarifying this to me, even if
>  those are not good news to me.
>
>  If complex reporting system is required, I think it is reasonable
>  enough to count on third-part solutions (even you own) to do that, and
>  do not get away from the purpose of GAE. I will think of something on
>  how to manage that on my end.
>
>  Just a thought though, as this service spreads, more and more people
>  will require this kind of things, because it would just be so cool to
>  leave the reporting integrated in a single solution.
>
>  Thinking about a third-party solution, we could also do something
>  stupid as downloading the datastore data (let's say, on a daily basis,
>  and only incremental to avoid spending all available quota on this),
>  processing all data mining required and uploading back to datastore.
>  Dirty, but sounds like a solution.
>
>  Thanks anyway for your help!
>
>
>  On May 6, 3:12 am, ryan  wrote:
>  > hi bruno! thanks for the post, this is a great question.
>  >
>  > the short answer is that the datastore simply doesn't support data
>  > warehouse or data mining well. it's doable, but far from ideal, for
>  > the reasons you've mentioned. it's aimed at serving webapps, which
>  > it's good at, but not at ad hoc reports or queries.
>  >
>  > for use cases like counters, if they're needed for end user requests,
>  > we usually recommend updating them on writes, as you mentioned, but
>  > you're right that that doesn't work for the arbitrary number of
>  > reports or queries that data warehouses traditionally support, nor
>  > does it work for the ad hoc queries often needed for data mining and
>  > business intelligence.
>  >
>  > right now, if you need an industrial strength data warehouse, i'd
>  > recommend bulk downloading your data and using a third party solution.
>  >
>


-- 
Barry

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

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



[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

Doing some more tests, and now the requests handler that
I was testing stopped giving errors...

My best guess is that someone (you?) is fixing the bug.
My fears is that the bug is really nasty and difficult to find/
reproduce and mutable.

Anyway, thanks a lot!

On May 6, 9:11 am, DarkCoiote  wrote:
> Actually, the problem still exists... it is only occurring in others
> requests handlers...
>
> And the new point of error is also a updating put
>
> What does this error actually means?
>
> On May 6, 9:00 am, DarkCoiote  wrote:
>
> > Well, It was working before, and now is working again!
>
> > Actually, the entity is being updated. But here is the code anyway
>
> >   person = get_person(owner)
> >     if person is None:
> >       self.response.out.write(minjson.write(None))
> >       return
>
> >     # converting to dict()                        - to do a
> > json.write at the end: is there a json.write to datastore models?
> >     tmpPerson['id'] = person.id
> >     
> >     tmpPerson['shipsLost'] = person.shipsLost
>
> >     # update access and reload
> >     if owner == viewer:
> >         person.name = urllib.unquote(self.request.get('name'))
> >         person.rank = get_rank(person.score, person.rank)
> >   Crazy math to get some new numbers
> >         now = datetime.now() + timedelta(hours=-3)
> >         ..
> >         reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
> > # 2 per hour
>
> >         person.lastAccess = datetime.now()
>
> >         person.availableShots = person.availableShots + reloadShots
> >         if person.availableShots > person.maxShots:
> >           person.availableShots = person.maxShots
> >         if person.availableShots < 0:
> >           person.availableShots = 0
>
> >         person.put()
>
> > I guess is all simple stuff that should not give any errors (as it
> > didn't give before and is not giving now)
>
> > Thanks a lot for the quick - almost instant - reply
>
> > On May 6, 7:10 am, "Nick Johnson (Google)" 
> > wrote:
>
> > > Hi,
>
> > > Can you please paste the code showing how you are constructing the
> > > entity you're trying to put?
>
> > > -Nick Johnson
>
> > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  wrote:
>
> > > > All of sudden I started getting this error for all of the request to
> > > > app. that requires datastore puts.
>
> > > > Someone has tweaked something. lol
>
> > > > The full log:
>
> > > > 'Entity' object has no attribute '_Entity__unindexed_properties'
> > > > Traceback (most recent call last):
> > > >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > > __init__.py", line 501, in __call__
> > > >    handler.get(*groups)
> > > >  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> > > > line 268, in get
> > > >    person.put()
> > > >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > > __init__.py", line 695, in put
> > > >    return datastore.Put(self._entity)
> > > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > > datastore.py", line 155, in Put
> > > >    req.entity_list().extend([e._ToPb() for e in entities])
> > > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > > datastore.py", line 513, in _ToPb
> > > >    name in self.__unindexed_properties):
> > > > AttributeError: 'Entity' object has no attribute
> > > > '_Entity__unindexed_properties'
>
> > > > Line of main.py 268:
> > > >  person.put()
>
> > > > Person model:
>
> > > > class Person(db.Model):
> > > >  id = db.StringProperty()
> > > >  name = db.StringProperty(default="") # for use with global rank
> > > >  score = db.IntegerProperty(default=0)
> > > >  rank = db.IntegerProperty(default=0) # military rank - from 0 to 17
> > > >  globalRankingPos = db.IntegerProperty(default=0) # global ranking
> > > > position
> > > >  trustness = db.FloatProperty(default=0.0)
> > > >  fakeness = db.FloatProperty(default=0.0)
> > > >  currentFleet = db.IntegerProperty(default=0)
> > > >  availableShots = db.IntegerProperty(default=0)
> > > >  maxShots = db.IntegerProperty(default=0)
> > > >  shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list",
> > > > default=[0,0,0,0,0]) # list in which position i has the number of i+1
> > > > sized ships
> > > >  shipsLost = db.ListProperty(int,verbose_name="Lost ships list",
> > > > default=[0,0,0,0,0])
> > > >  lastAccess = db.DateTimeProperty(auto_now_add=True)
>
> > > > Any thing I can do?
>
> > > > Thanks alot!
--~--~-~--~~~---~--~~
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: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

Actually, the problem still exists... it is only occurring in others
requests handlers...

And the new point of error is also a updating put

What does this error actually means?

On May 6, 9:00 am, DarkCoiote  wrote:
> Well, It was working before, and now is working again!
>
> Actually, the entity is being updated. But here is the code anyway
>
>   person = get_person(owner)
>     if person is None:
>       self.response.out.write(minjson.write(None))
>       return
>
>     # converting to dict()                        - to do a
> json.write at the end: is there a json.write to datastore models?
>     tmpPerson['id'] = person.id
>     
>     tmpPerson['shipsLost'] = person.shipsLost
>
>     # update access and reload
>     if owner == viewer:
>         person.name = urllib.unquote(self.request.get('name'))
>         person.rank = get_rank(person.score, person.rank)
>   Crazy math to get some new numbers
>         now = datetime.now() + timedelta(hours=-3)
>         ..
>         reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
> # 2 per hour
>
>         person.lastAccess = datetime.now()
>
>         person.availableShots = person.availableShots + reloadShots
>         if person.availableShots > person.maxShots:
>           person.availableShots = person.maxShots
>         if person.availableShots < 0:
>           person.availableShots = 0
>
>         person.put()
>
> I guess is all simple stuff that should not give any errors (as it
> didn't give before and is not giving now)
>
> Thanks a lot for the quick - almost instant - reply
>
> On May 6, 7:10 am, "Nick Johnson (Google)" 
> wrote:
>
> > Hi,
>
> > Can you please paste the code showing how you are constructing the
> > entity you're trying to put?
>
> > -Nick Johnson
>
> > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  wrote:
>
> > > All of sudden I started getting this error for all of the request to
> > > app. that requires datastore puts.
>
> > > Someone has tweaked something. lol
>
> > > The full log:
>
> > > 'Entity' object has no attribute '_Entity__unindexed_properties'
> > > Traceback (most recent call last):
> > >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > > __init__.py", line 501, in __call__
> > >    handler.get(*groups)
> > >  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> > > line 268, in get
> > >    person.put()
> > >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > > __init__.py", line 695, in put
> > >    return datastore.Put(self._entity)
> > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > datastore.py", line 155, in Put
> > >    req.entity_list().extend([e._ToPb() for e in entities])
> > >  File "/base/python_lib/versions/1/google/appengine/api/
> > > datastore.py", line 513, in _ToPb
> > >    name in self.__unindexed_properties):
> > > AttributeError: 'Entity' object has no attribute
> > > '_Entity__unindexed_properties'
>
> > > Line of main.py 268:
> > >  person.put()
>
> > > Person model:
>
> > > class Person(db.Model):
> > >  id = db.StringProperty()
> > >  name = db.StringProperty(default="") # for use with global rank
> > >  score = db.IntegerProperty(default=0)
> > >  rank = db.IntegerProperty(default=0) # military rank - from 0 to 17
> > >  globalRankingPos = db.IntegerProperty(default=0) # global ranking
> > > position
> > >  trustness = db.FloatProperty(default=0.0)
> > >  fakeness = db.FloatProperty(default=0.0)
> > >  currentFleet = db.IntegerProperty(default=0)
> > >  availableShots = db.IntegerProperty(default=0)
> > >  maxShots = db.IntegerProperty(default=0)
> > >  shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list",
> > > default=[0,0,0,0,0]) # list in which position i has the number of i+1
> > > sized ships
> > >  shipsLost = db.ListProperty(int,verbose_name="Lost ships list",
> > > default=[0,0,0,0,0])
> > >  lastAccess = db.DateTimeProperty(auto_now_add=True)
>
> > > Any thing I can do?
>
> > > Thanks alot!
--~--~-~--~~~---~--~~
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: store files to datastore in a folder like structure?

2009-05-06 Thread Shedokan

Tim:
I don't quite understand most of what you said because I kinda really
new to python programming I know only php and python, but what I do
understand I will try to do.

What type do you people suggest I'll use for the file content?

On 6 מאי, 06:16, Pranav Prakash  wrote:
> class Folder(db.Model):
>   name = db.StringProperty()
>   subfolders = db.ListProperty(File)
>   parent = db.SelfReferenceProperty()
>
> This is how folder can be implemented. A folder must know what all
> files are child. Also a folder must know the parent folder (folders in
> case of cyclic dir structure).
>
> Apart from this, you might also implement Linux inode system in a
> model, for book keeping.
>
> On May 6, 5:41 am, Tim Hoffman  wrote:
>
> > You will need to create a Folder entity
> > It will need to know it's children, and you will need to support
> > some form of url traversability to walk the folder heirarchy.
>
> > I am doing that with zope3 components on gae
>
> > Django doesn't normally do url traversing, but has a regex match to
> > method
>
> > Do you really need a folder heirarchy, have you gone down  that path
> > because you are just trying to
> > replicate a filesystem, with out really needing those semantics ?
>
> > If you really want this sort of functionality you might want to look
> > at repoze.bfg it is just been
> > made useable under gae (and is zope 3 based though much simpler) and
> > does support inherintly
> > the notion of url traversal over an object model/graph
>
> > Rgds
>
> > T
>
> > On May 6, 6:34 am, Shedokan  wrote:
>
> > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > og GAE and I came to the stage where I need to read and write files.
>
> > > And after a lot of searching I found out that I cannot create files or
> > > write to files.
> > > here is my code:
>
> > > from google.appengine.ext import db
>
> > > class File(db.Model):
> > >         filename = db.StringProperty(multiline=False)
> > >         filedata = db.BlobProperty
> > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > def createFile(fileName, content):
> > >         if fileName=='' or content=='':
> > >                 return
> > >         file = File()
> > >         file.filedata = content
> > >         file.filename = fileName
> > >         file.put()
>
> > > def getFile(fileName):
>
> > >         if fileName=='':
> > >                 return
> > >         return db.GqlQuery('SELECT * FROM File WHERE filename= 
> > > :1',fileName)
>
> > > any way to make this work with a folder structure?
>
> > > also I want to note that I started learning python just about 3 days
> > > ago, so I think I'm a begginer.
>
> > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

Well, It was working before, and now is working again!

Actually, the entity is being updated. But here is the code anyway


  person = get_person(owner)
if person is None:
  self.response.out.write(minjson.write(None))
  return


# converting to dict()- to do a
json.write at the end: is there a json.write to datastore models?
tmpPerson['id'] = person.id

tmpPerson['shipsLost'] = person.shipsLost

# update access and reload
if owner == viewer:
person.name = urllib.unquote(self.request.get('name'))
person.rank = get_rank(person.score, person.rank)
  Crazy math to get some new numbers
now = datetime.now() + timedelta(hours=-3)
..
reloadShots = 0 +  ((now.hour+(24*dayDiff))*2)-(before.hour*2)
# 2 per hour

person.lastAccess = datetime.now()

person.availableShots = person.availableShots + reloadShots
if person.availableShots > person.maxShots:
  person.availableShots = person.maxShots
if person.availableShots < 0:
  person.availableShots = 0

person.put()


I guess is all simple stuff that should not give any errors (as it
didn't give before and is not giving now)

Thanks a lot for the quick - almost instant - reply

On May 6, 7:10 am, "Nick Johnson (Google)" 
wrote:
> Hi,
>
> Can you please paste the code showing how you are constructing the
> entity you're trying to put?
>
> -Nick Johnson
>
> On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  wrote:
>
> > All of sudden I started getting this error for all of the request to
> > app. that requires datastore puts.
>
> > Someone has tweaked something. lol
>
> > The full log:
>
> > 'Entity' object has no attribute '_Entity__unindexed_properties'
> > Traceback (most recent call last):
> >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > __init__.py", line 501, in __call__
> >    handler.get(*groups)
> >  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> > line 268, in get
> >    person.put()
> >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 695, in put
> >    return datastore.Put(self._entity)
> >  File "/base/python_lib/versions/1/google/appengine/api/
> > datastore.py", line 155, in Put
> >    req.entity_list().extend([e._ToPb() for e in entities])
> >  File "/base/python_lib/versions/1/google/appengine/api/
> > datastore.py", line 513, in _ToPb
> >    name in self.__unindexed_properties):
> > AttributeError: 'Entity' object has no attribute
> > '_Entity__unindexed_properties'
>
> > Line of main.py 268:
> >  person.put()
>
> > Person model:
>
> > class Person(db.Model):
> >  id = db.StringProperty()
> >  name = db.StringProperty(default="") # for use with global rank
> >  score = db.IntegerProperty(default=0)
> >  rank = db.IntegerProperty(default=0) # military rank - from 0 to 17
> >  globalRankingPos = db.IntegerProperty(default=0) # global ranking
> > position
> >  trustness = db.FloatProperty(default=0.0)
> >  fakeness = db.FloatProperty(default=0.0)
> >  currentFleet = db.IntegerProperty(default=0)
> >  availableShots = db.IntegerProperty(default=0)
> >  maxShots = db.IntegerProperty(default=0)
> >  shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list",
> > default=[0,0,0,0,0]) # list in which position i has the number of i+1
> > sized ships
> >  shipsLost = db.ListProperty(int,verbose_name="Lost ships list",
> > default=[0,0,0,0,0])
> >  lastAccess = db.DateTimeProperty(auto_now_add=True)
>
> > Any thing I can do?
>
> > Thanks alot!
--~--~-~--~~~---~--~~
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] filter on many to many reference collections

2009-05-06 Thread Dave

Hi All, I just can seem to figure out the magic to make this work.
Appreciate any guidance.

I have the following models:

Class User(db.Model)
name = db.StringProperty()
...

Class Connections(db.Model)
user = db.ReferenceProperty(User, collection_name='users'
friend = db.ReferenceProperty(User, collection_name='friends'

and then I can do:

user = User.get_by_id(uid)
friends = user.friends
for friend in friends:
   print friend.user.key().id()

and it works well What I can't figure out is how to filter such as
below.

query = user.friends.filter('__key__', db.Key.from_path
('User',uid)).get()
(may be used to check for a duplicate connection)
or
query = user.friends.filter('email =', u...@blah.com).fetch()
(grab friends email address...)

Any help is greatly appreciated!

Dave




--~--~-~--~~~---~--~~
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: store files to datastore in a folder like structure?

2009-05-06 Thread Pranav Prakash

A folder can contain following
 -- One or more files
 -- One or more folders (called subfolders)
 -- Link to parent directory. The one referred to as a dot (.) in
Windows OS

class Folder(db.Model):
  files = db.ListProperty(db.Key)
  subfolders = db.ListProperty(db.Key)
  parentfolder = db.SelfreferenceProperty()

The *files* attribute will contain a list of Keys of files which are
inside this folder.
The *folders* attribute will contain a list of Keys of folders which
are inside this folder
The *parent* will contain a reference to the parent folder.

This schema will work good on acyclic directory structure. For a more
broader view, you can have three Models
-- File
-- Folder
-- Folder2File
The last Model will contain a many-to-many relationship between files
and folders

>    "subfolders = db.ListProperty(Folder)"
> seems not working.

subfolders = db.ListProperty(Folder)
is syntactically wrong. A ListProperty can not refer to a Model.

Cheers,
--
Pranav Prakash

"This life is more than ordinary"

>
> 2009/5/6 Pranav Prakash 
>
>
>
> > class Folder(db.Model):
> >  name = db.StringProperty()
> >  subfolders = db.ListProperty(File)
> >  parent = db.SelfReferenceProperty()
>
> > This is how folder can be implemented. A folder must know what all
> > files are child. Also a folder must know the parent folder (folders in
> > case of cyclic dir structure).
>
> > Apart from this, you might also implement Linux inode system in a
> > model, for book keeping.
>
> > On May 6, 5:41 am, Tim Hoffman  wrote:
> > > You will need to create a Folder entity
> > > It will need to know it's children, and you will need to support
> > > some form of url traversability to walk the folder heirarchy.
>
> > > I am doing that with zope3 components on gae
>
> > > Django doesn't normally do url traversing, but has a regex match to
> > > method
>
> > > Do you really need a folder heirarchy, have you gone down  that path
> > > because you are just trying to
> > > replicate a filesystem, with out really needing those semantics ?
>
> > > If you really want this sort of functionality you might want to look
> > > at repoze.bfg it is just been
> > > made useable under gae (and is zope 3 based though much simpler) and
> > > does support inherintly
> > > the notion of url traversal over an object model/graph
>
> > > Rgds
>
> > > T
>
> > > On May 6, 6:34 am, Shedokan  wrote:
>
> > > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > > og GAE and I came to the stage where I need to read and write files.
>
> > > > And after a lot of searching I found out that I cannot create files or
> > > > write to files.
> > > > here is my code:
>
> > > > from google.appengine.ext import db
>
> > > > class File(db.Model):
> > > >         filename = db.StringProperty(multiline=False)
> > > >         filedata = db.BlobProperty
> > > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > > def createFile(fileName, content):
> > > >         if fileName=='' or content=='':
> > > >                 return
> > > >         file = File()
> > > >         file.filedata = content
> > > >         file.filename = fileName
> > > >         file.put()
>
> > > > def getFile(fileName):
>
> > > >         if fileName=='':
> > > >                 return
> > > >         return db.GqlQuery('SELECT * FROM File WHERE filename=
> > :1',fileName)
>
> > > > any way to make this work with a folder structure?
>
> > > > also I want to note that I started learning python just about 3 days
> > > > ago, so I think I'm a begginer.
>
> > > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-06 Thread Iap
" subfolders = db.ListProperty(File) " ?
Sorry, I don't get it.
Because, a Folder might contains Folders and Files.
But:
   "subfolders = db.ListProperty(Folder)"
seems not working.

2009/5/6 Pranav Prakash 

>
>
>
> class Folder(db.Model):
>  name = db.StringProperty()
>  subfolders = db.ListProperty(File)
>  parent = db.SelfReferenceProperty()
>
> This is how folder can be implemented. A folder must know what all
> files are child. Also a folder must know the parent folder (folders in
> case of cyclic dir structure).
>
> Apart from this, you might also implement Linux inode system in a
> model, for book keeping.
>
>
> On May 6, 5:41 am, Tim Hoffman  wrote:
> > You will need to create a Folder entity
> > It will need to know it's children, and you will need to support
> > some form of url traversability to walk the folder heirarchy.
> >
> > I am doing that with zope3 components on gae
> >
> > Django doesn't normally do url traversing, but has a regex match to
> > method
> >
> > Do you really need a folder heirarchy, have you gone down  that path
> > because you are just trying to
> > replicate a filesystem, with out really needing those semantics ?
> >
> > If you really want this sort of functionality you might want to look
> > at repoze.bfg it is just been
> > made useable under gae (and is zope 3 based though much simpler) and
> > does support inherintly
> > the notion of url traversal over an object model/graph
> >
> > Rgds
> >
> > T
> >
> > On May 6, 6:34 am, Shedokan  wrote:
> >
> > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > og GAE and I came to the stage where I need to read and write files.
> >
> > > And after a lot of searching I found out that I cannot create files or
> > > write to files.
> > > here is my code:
> >
> > > from google.appengine.ext import db
> >
> > > class File(db.Model):
> > > filename = db.StringProperty(multiline=False)
> > > filedata = db.BlobProperty
> > > date = db.DateTimeProperty(auto_now_add=True)
> >
> > > def createFile(fileName, content):
> > > if fileName=='' or content=='':
> > > return
> > > file = File()
> > > file.filedata = content
> > > file.filename = fileName
> > > file.put()
> >
> > > def getFile(fileName):
> >
> > > if fileName=='':
> > > return
> > > return db.GqlQuery('SELECT * FROM File WHERE filename=
> :1',fileName)
> >
> > > any way to make this work with a folder structure?
> >
> > > also I want to note that I started learning python just about 3 days
> > > ago, so I think I'm a begginer.
> >
> > > thanks.
> >
>

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



[google-appengine] Re: Using PyCrypto

2009-05-06 Thread Nick Johnson (Google)

On Tue, May 5, 2009 at 11:25 PM, Devel63  wrote:
>
> Has anyone used PyCrypto successfully with App Engine (http://
> code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)?
> I've run into 2 obstacles -
>
> 1) Since there's no distribution with App Engine SDK, does anyone know
> a safe source of the library for use on a Windows development machine?

Install easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall

Then issue the command "easy_install pycrypto"

>
> 2) Trying to use it on http://shell.appspot.com, I get errors
>
>from Crypto.Cipher import DES
>obj=DES.new('abcdefgh', DES.MODE_ECB)
>
> -->all sorts of traceback errors mentioning pickling

As I said in your other thread, shell.appspot.com uses pickle to
persist data between requests. This is not an issue with usage inside
your app.

-Nick Johnson

--~--~-~--~~~---~--~~
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: PyCrypto Working?

2009-05-06 Thread Nick Johnson (Google)

Hi Dan,

shell.appspot.com uses the Pickle module to persist objects between
user requests. Evidently, PyCrypto objects are not picklable. This is
not a problem using PyCrypto in your own code, unless you intended to
pickle them.

-Nick Johnson

On Wed, May 6, 2009 at 3:25 AM, Devel63  wrote:
>
> Has anyone gotten the new support for PyCrypto to work?  (http://
> code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)
>
> When I try it on http://shell.appspot.com, I get error messages about
> pickling.
>
>- from Crypto.Cipher import DES
>- obj=DES.new('abcdefgh', DES.MODE_ECB)
>
>
> 

--~--~-~--~~~---~--~~
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: You haven't set the DATABASE_ENGINE setting yet

2009-05-06 Thread Nick Johnson (Google)

Hi Howard,

We need much more information to be of any assistance. Where are you
getting this error? Using Java, or Python?

Please post the complete stacktrace, as well as any relevant code and
configuration files.

-Nick Johnson

On Wed, May 6, 2009 at 4:01 AM, Howard  wrote:
>
> I suddenly started to get this error... but never changed this
> setting.  This error is critical and causing my entire site to crash.
> The DATABASE_ENGINE was set to 'dummy'.  I have also tried to set it
> to 'appengine', neither seems to be working.
> 

--~--~-~--~~~---~--~~
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: 'Entity' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread Nick Johnson (Google)

Hi,

Can you please paste the code showing how you are constructing the
entity you're trying to put?

-Nick Johnson

On Wed, May 6, 2009 at 11:06 AM, DarkCoiote  wrote:
>
> All of sudden I started getting this error for all of the request to
> app. that requires datastore puts.
>
> Someone has tweaked something. lol
>
> The full log:
>
> 'Entity' object has no attribute '_Entity__unindexed_properties'
> Traceback (most recent call last):
>  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 501, in __call__
>handler.get(*groups)
>  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
> line 268, in get
>person.put()
>  File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 695, in put
>return datastore.Put(self._entity)
>  File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 155, in Put
>req.entity_list().extend([e._ToPb() for e in entities])
>  File "/base/python_lib/versions/1/google/appengine/api/
> datastore.py", line 513, in _ToPb
>name in self.__unindexed_properties):
> AttributeError: 'Entity' object has no attribute
> '_Entity__unindexed_properties'
>
>
>
> Line of main.py 268:
>  person.put()
>
> Person model:
>
> class Person(db.Model):
>  id = db.StringProperty()
>  name = db.StringProperty(default="") # for use with global rank
>  score = db.IntegerProperty(default=0)
>  rank = db.IntegerProperty(default=0) # military rank - from 0 to 17
>  globalRankingPos = db.IntegerProperty(default=0) # global ranking
> position
>  trustness = db.FloatProperty(default=0.0)
>  fakeness = db.FloatProperty(default=0.0)
>  currentFleet = db.IntegerProperty(default=0)
>  availableShots = db.IntegerProperty(default=0)
>  maxShots = db.IntegerProperty(default=0)
>  shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list",
> default=[0,0,0,0,0]) # list in which position i has the number of i+1
> sized ships
>  shipsLost = db.ListProperty(int,verbose_name="Lost ships list",
> default=[0,0,0,0,0])
>  lastAccess = db.DateTimeProperty(auto_now_add=True)
>
>
> Any thing I can do?
>
> Thanks alot!
> >

--~--~-~--~~~---~--~~
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' object has no attribute '_Entity__unindexed_properties'

2009-05-06 Thread DarkCoiote

All of sudden I started getting this error for all of the request to
app. that requires datastore puts.

Someone has tweaked something. lol

The full log:

'Entity' object has no attribute '_Entity__unindexed_properties'
Traceback (most recent call last):
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 501, in __call__
handler.get(*groups)
  File "/base/data/home/apps/naval-war/1.333185504277530133/main.py",
line 268, in get
person.put()
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 695, in put
return datastore.Put(self._entity)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 155, in Put
req.entity_list().extend([e._ToPb() for e in entities])
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 513, in _ToPb
name in self.__unindexed_properties):
AttributeError: 'Entity' object has no attribute
'_Entity__unindexed_properties'



Line of main.py 268:
 person.put()

Person model:

class Person(db.Model):
  id = db.StringProperty()
  name = db.StringProperty(default="") # for use with global rank
  score = db.IntegerProperty(default=0)
  rank = db.IntegerProperty(default=0) # military rank - from 0 to 17
  globalRankingPos = db.IntegerProperty(default=0) # global ranking
position
  trustness = db.FloatProperty(default=0.0)
  fakeness = db.FloatProperty(default=0.0)
  currentFleet = db.IntegerProperty(default=0)
  availableShots = db.IntegerProperty(default=0)
  maxShots = db.IntegerProperty(default=0)
  shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list",
default=[0,0,0,0,0]) # list in which position i has the number of i+1
sized ships
  shipsLost = db.ListProperty(int,verbose_name="Lost ships list",
default=[0,0,0,0,0])
  lastAccess = db.DateTimeProperty(auto_now_add=True)


Any thing I can do?

Thanks alot!
--~--~-~--~~~---~--~~
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: Querying a DateTimeProperty from the dashboard

2009-05-06 Thread Paul Kinlan
Ok, I presume that is the same for the dashboard then?

2009/5/6 djidjadji 

>
> http://code.google.com/appengine/docs/python/datastore/gqlreference.html
>
> In the mid of the page, convert the string to a DateTime.
>
> 2009/5/6 Paul Kinlan :
> > Hi Guys,
> >
> > I might be being silly here, I am trying a query through the DataViewer
> that
> > is along the lines of:
> >
> > SELECT * FROM SearchCampaigns WHERE priority = True and finished = False
> and
> > next_update < '2009-05-06 06:08:37' ORDER BY next_update
> >
> > The problem I am seeing is that it returns values where the next_date
> might
> > be something like 2009-05-06 06:38:12.  It looks like it is not filtering
> > dates converted from strings correctly?
> >
> > I have checked the issues page and the closest I have found so far is
> > http://code.google.com/p/googleappengine/issues/detail?id=1114
> >
> > Paul
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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: Querying a DateTimeProperty from the dashboard

2009-05-06 Thread djidjadji

http://code.google.com/appengine/docs/python/datastore/gqlreference.html

In the mid of the page, convert the string to a DateTime.

2009/5/6 Paul Kinlan :
> Hi Guys,
>
> I might be being silly here, I am trying a query through the DataViewer that
> is along the lines of:
>
> SELECT * FROM SearchCampaigns WHERE priority = True and finished = False and
> next_update < '2009-05-06 06:08:37' ORDER BY next_update
>
> The problem I am seeing is that it returns values where the next_date might
> be something like 2009-05-06 06:38:12.  It looks like it is not filtering
> dates converted from strings correctly?
>
> I have checked the issues page and the closest I have found so far is
> http://code.google.com/p/googleappengine/issues/detail?id=1114
>
> Paul
>
> >
>

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



[google-appengine] Re: How to iterate a json string using dictionary

2009-05-06 Thread djidjadji

eval() the strings you receive in the request?
One way of getting to execute any python code in his application.

You can use the simple JSON that comes with GAE in Django

from django.utils import simplejson


2009/5/6 风笑雪 :
> json = '{element1: "haha", element2: 123}'
> d = eval(json)
> print d['element1'], d.['element2']
>
> 2009/5/6 arnie 
>>
>> I am getting a very simple json string that contains only 14 elements
>> Can't we use python dictionary to extract the elements of json?
>> 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: passing a variable value from html file to views.py

2009-05-06 Thread Pranav Prakash

As per my perception of the problem, you basically need a tracking
mechanism to find out how many click were made on a particular ad and
maybe, some more information.

If you look at the ads shown by google (or any other agency), they
have the advt url as

http://adservicename.com/ads?adurl=

The same concept can be applied to your ads. Instead of displaying the
actual links, you can use a script that will gather all information
and later redirect to the ad url.

Cheers
--
Pranav Prakash

"This life is more than ordinary"

On May 6, 4:57 am, Aaron  wrote:
> HI, I need help on passing a variable from the html file to views.py
>
> what I am doing is making a ad system. Currently working on making a
> clicks per ad count.
>
> So I have it structured like this:
>
> Their is 2 files:  views.py   and  context.py
>
> context.py  this files job is to send variable values to the html
> file.
>
> This will be the ads graphic url and also the website url.
>
> then at the html file.  I put the ads url to the site variable in a
> form with a input type hidden.
>
> I then have javascript that will autmaticly submit the forms. The
> forms action is the url that I specified in urls.py.
>
> Now  I have in the urls.py to point to the function in views.py that
> will handel the processing.
>
> So right now I am getting an Error  :   MultiValueDictKeyError
>
> then it says : "Key 'adr' not found in "
>
> The adr  code is :  url = request.POST['adr']
>
> what do I need to pass a variable value from a form or any other
> method.
>
> I need to have a way that when they click the ad that I would send the
> ads url to the website to views.py
>
> because the views.py  will update the database by a field named
> number of clicks  and it would just add 1 to that number.
>
> Then it would redirect the user to the ads url to the ads website.
>
> thats what I need to do and so far am having trouble getting something
> to work.
>
> I am new to google apps engine and django.
>
> we use both google apps engine and django.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: The API call mail.Send() required more quota than is available.

2009-05-06 Thread Prashant Gupta
does it count on no. of emails or no. of recipients??

--~--~-~--~~~---~--~~
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: The API call mail.Send() required more quota than is available.

2009-05-06 Thread Prashant Gupta
is there any official "per minute" limit on sending mail?

--~--~-~--~~~---~--~~
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: email issue with Google Apps e-mail "Group"

2009-05-06 Thread Sylvain

Maybe the issue is related to a spf record ?
http://www.google.com/support/a/bin/static.py?page=known_issues.cs#

But before changing the spf records, I need to be sure that it will
work.

If GAE can't send a mail to a Google Apps group (of users) (which is
not related to Google [G]roups), it is a very big issue for such a
basic feature.

Google Apps and GAE seem to be "linked" but it fails to send a mail...

Regards.


On 5 mai, 14:05, Sylvain  wrote:
> I don't think we are talking about the same thing.
> You are talking about "Post a message".
> I just want to "send" a mail
>
> Here is a picture about what I'm talking.
>
> http://img206.imageshack.us/my.php?image=gappgroup.jpg
>
> Sylvain
>
> On 5 mai, 13:57, Sylvain  wrote:
>
> > Yes, this group is correctly parameter.
>
> > I'm just testing to send a mail to support@.com with my gmail
> > adress and many other e-mail adresses (hotmail,... etc,...). And all
> > my tests work.
>
> > So there is only an issue with mails from GAE.
>
> > Sylvain
>
> > On 5 mai, 13:42, "Nick Johnson (Google)" 
> > wrote:
>
> > > Hi Sylvain,
>
> > > Even for groups that are marked 'public', they generally require that
> > > the sender be a member of the group before they can post. In addition
> > > to setting the group as "public", you also need to select "anyone can
> > > post" under "who can post messages?" on the Access tab of the group's
> > > settings.
>
> > > -Nick Johnson
--~--~-~--~~~---~--~~
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: join group-by queries, reports and data warehousing

2009-05-06 Thread bruno.braga

Hi Ryan,

Thanks for the quick reply, and for clarifying this to me, even if
those are not good news to me.

If complex reporting system is required, I think it is reasonable
enough to count on third-part solutions (even you own) to do that, and
do not get away from the purpose of GAE. I will think of something on
how to manage that on my end.

Just a thought though, as this service spreads, more and more people
will require this kind of things, because it would just be so cool to
leave the reporting integrated in a single solution.

Thinking about a third-party solution, we could also do something
stupid as downloading the datastore data (let's say, on a daily basis,
and only incremental to avoid spending all available quota on this),
processing all data mining required and uploading back to datastore.
Dirty, but sounds like a solution.

Thanks anyway for your help!

On May 6, 3:12 am, ryan  wrote:
> hi bruno! thanks for the post, this is a great question.
>
> the short answer is that the datastore simply doesn't support data
> warehouse or data mining well. it's doable, but far from ideal, for
> the reasons you've mentioned. it's aimed at serving webapps, which
> it's good at, but not at ad hoc reports or queries.
>
> for use cases like counters, if they're needed for end user requests,
> we usually recommend updating them on writes, as you mentioned, but
> you're right that that doesn't work for the arbitrary number of
> reports or queries that data warehouses traditionally support, nor
> does it work for the ad hoc queries often needed for data mining and
> business intelligence.
>
> right now, if you need an industrial strength data warehouse, i'd
> recommend bulk downloading your data and using a third party solution.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---