[google-appengine] Getting 502 server error occassionally

2011-04-18 Thread nischalshetty
I got it twice in a gap of 5 minutes. Displays the blue Google Error page.

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



[google-appengine] Re: Getting 502 server error occassionally

2011-04-18 Thread nischalshetty
Got it a couple of times more now. There definitely is a problem!

-- 
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: communicate with channel over external python app?

2011-04-18 Thread Dale
Thanks, will look in to PubNub.
Dale

On Apr 16, 9:11 pm, Stephen Blum  wrote:
> Dale,
>
> Like Andreas stated above the XMPP API will be more what you are
> seeking, however you'll need to write a wrapper between your Channel
> API and the XMPP receiver.  There are Cloud services available such as
> PubNub that provide this layer of communication automatically between
> all types of hardware.  I recommend checking them out.
>
> Stephen
>
> On Apr 16, 2:56 am, Dale  wrote:
>
> > You might want to star this 
> > issuehttp://code.google.com/p/googleappengine/issues/detail?id=4189
> > Once the java version is in place it could then be ported to python.
>
> > (As an aside we have an embedded system written in C that polls our
> > app. Having a simple, non-browser based Channels API would be much
> > better for us as well.)
>
> > Dale
>
> > On Apr 15, 7:57 pm, andreas schmid  wrote:
>
> > > i see. thank you
>
> > > On Apr 15, 2011, at 1:29 PM, Calvin wrote:
>
> > > > Channel API is one-way, and currently only works when the recipient is 
> > > > a JavaScript-capable web browser.
>
> > > > The XMPP api might be more what you're looking for:
> > > >http://code.google.com/appengine/docs/python/xmpp/overview.html
>
> > > > Calvin
> > > > p.s. Second person asking about using Channel API with a non-browser 
> > > > client in a month.
> > > >https://groups.google.com/forum/#!topic/google-appengine/fZeNkYIiKeU
>
> > > > --
> > > > 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 
> > > > athttp://groups.google.com/group/google-appengine?hl=en.

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



Re: [google-appengine] Help a Newbie and earn Karma

2011-04-18 Thread djidjadji
The method dict.values() is the same as your mapToList(dictionary)
function, but a lot faster.

2011/4/14 Jeremy Foote :
> I am new to App Engine, new to Python, and new to programming. :)
> Unfortunately, I don't know what I don't know, so this question will be more
> vague than I would like.

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



[google-appengine] How to resolve Object Manager has been closed error

2011-04-18 Thread Kayode Odeyemi
Hello,

I'll appreciate if someone can point me to a tutorial or best practice on
how to close
JDO connection. I constantly get javax.jdo.JDOUserException: Object Manager
has been closed error
whenever I include the finally block. My code is below:

public static List findAgentEntityByString(String id) {
List agententity = new ArrayList();
if (id == null) {
  return null;
}
try {
Query q = pm.newQuery("select id from " +
AgentEntity.class.getName());
agententity = (List) q.execute();
} catch(Exception ex) {
log.warning(ex.getMessage());
}
return agententity;
  }

Regards

-- 
Odeyemi 'Kayode O.
http://www.sinati.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.



Re: [google-appengine] Having a problem when I deploy my project into Google App Engine.

2011-04-18 Thread Robert Kluin
Sort of looks like you've overwrote some variable with a 'Profile' instance.






On Mon, Apr 18, 2011 at 03:43, T K  wrote:
> Everything works fine for my local development machine, but when I deploy
> into the Google App Engine, I get an error after logging in using Google
> Account.
>
> : Profile instance has no attribute
> 'initialize'
> Traceback (most recent call last):
>   File
> "/base/data/home/apps/aidreliefcoordinator/1.349538561487495342/aidcoordinator.py",
> line 83, in main
> run_wsgi_app(application)
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/util.py",
> line 98, in run_wsgi_app
> run_bare_wsgi_app(add_wsgi_middleware(application))
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/util.py",
> line 116, in run_bare_wsgi_app
> result = application(env, _start_response)
>   File
> "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py",
> line 622, in __call__
> handler.initialize(request, response)
> : Profile instance has no attribute
> 'initialize'
>
> The URL of my application is http://www.aidreliefcoordinator.appspot.com.
> Thanks a lot
> Nong
>
> --
> 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.
>

-- 
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] 20 seconds problem

2011-04-18 Thread Matija
Ok, here is my story.

GAE has some never officially exposed contention problem with Tasks within 
Transactions
 and 
I have already wrote about this problem 
here
. 

I have collected some test data. This problem exists on M/S and HR datastore 
app version and it doesn't matter if you do some datastore operation or not 
with task enqueuing in transaction. Also it doesn't matter if you enqueue 
two tasks in transaction in same task queue or in two different task queues. 
It isn't also related to task request in some strange class name or 
seialversionid related way.

This contention is related in some nonsense and unreasonable way (from my 
point) to application. Maybe to some service part that gives task queue job 
name (Transactional tasks must not have user-specified names) or something 
strange like that.

Ok. We have some new limit that I didn't noticed before. It's fine. You 
(Googlers) won't speak about it because you are embarrassed :D, have more 
important task to do or simply you don't care. It's fine. This is preview, 
alpha, beta or what ever and we agreed to this. We don't have official 
support and we are fine with that.

But, I want to reduce the consequences of this situation in a way to lower 
number of seconds of task queue to wait before retrying a task after it 
fails and I can't. For some strange reason it is always 20 second. I have 
tried almost every possible variation of task queue parameters but I won't 
work.

If I set parameters in this way should I not get maximum 10 second backoff 
period, or 20 second is minimum ? What is minimum for max-backoff-seconds? 
Is this 20 seconds somehow related to GAE task queue backend speed ?


  5
  10
  0


2011-04-18 05:20:46.146 /_ah/queue/testni 200 117ms 99cpu_ms 0kb 
AppEngine-Google; 
(+http://code.google.com/appengine)... task_name=7241583885447122407
2011-04-18 05:20:26.008 /_ah/queue/testni 500 1193ms 240cpu_ms 0kb 
AppEngine-Google; 
(+http://code.google.com/appengine)... task_name=7241583885447122407

Thank you for your time, MATijA.

-- 
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 set collection_name for a dynamic property of Expando?

2011-04-18 Thread saintthor
how add an attribute of ReferenceProperty to Expando then?

On 4月18日, 下午2时36分, "Nick Johnson (Google)" 
wrote:
> Hi,
>
> 'collection_name' is a property of the ReferenceProperty class. You can't
> have a collection_name if you don't have a reference property.
>
> -Nick Johnson
>
>
>
> On Mon, Apr 18, 2011 at 2:04 AM, saintthor  wrote:
> > class LTMean( db.Expando ): #Expando
> >Info = db.TextProperty()
>
> > def NewMean( k, v ):
> >newMean = LTMean()
> >setattr( newMean, k, LTMean( key_name = v ).key() )
> >newMean.put()
>
> > ==
> > how to set the collection_name?
>
> > --
> > 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.
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine

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



Re: [google-appengine] Re: how to set collection_name for a dynamic property of Expando?

2011-04-18 Thread Robert Kluin
Just a note:  'collection_name' is just a query that is put on the
'target' kind when the 'referencing' kind is defined.  Your definition
of the 'referencing' kind doesn't define of those reference properties
-- so this likely won't work as you're expecting.  Perhaps if you
explain how exactly you're using this we could offer some alternative
ideas.

You could simply do something like this:

class LTMean( db.Expando ):
# your definition
def find_referrers(self, prop):
return LTMean().all().filter(prop, self)

Then, instead of ltmean_entity.some_collection_name, you'll do
ltmean_entity.find_referrers('some_thing').



Robert





2011/4/18 saintthor :
> how add an attribute of ReferenceProperty to Expando then?
>
> On 4月18日, 下午2时36分, "Nick Johnson (Google)" 
> wrote:
>> Hi,
>>
>> 'collection_name' is a property of the ReferenceProperty class. You can't
>> have a collection_name if you don't have a reference property.
>>
>> -Nick Johnson
>>
>>
>>
>> On Mon, Apr 18, 2011 at 2:04 AM, saintthor  wrote:
>> > class LTMean( db.Expando ): #Expando
>> >Info = db.TextProperty()
>>
>> > def NewMean( k, v ):
>> >newMean = LTMean()
>> >setattr( newMean, k, LTMean( key_name = v ).key() )
>> >newMean.put()
>>
>> > ==
>> > how to set the collection_name?
>>
>> > --
>> > 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.
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
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 set collection_name for a dynamic property of Expando?

2011-04-18 Thread saintthor
thank you.

in the first post is my real code.

i regard every LTMean entity as a node, and make the nodes to a map by
( k, v ) relations. by every ( k, v ) way,  i can go from one node to
another, or go back to the firest.

if use Model, it would be
=

class LTMean( db.Model): #Model
Info = db.TextProperty()
Way = db.SelfReferenceProperty( collection_name = "Some_Set" )

def NewMean( v ):
newMean = LTMean()
newMean.Way = LTMean( key_name = v )
newMean.put()
=

but i must set variable attribute name of Way, so i need Expendo.

On 4月18日, 下午8时51分, Robert Kluin  wrote:
> Just a note:  'collection_name' is just a query that is put on the
> 'target' kind when the 'referencing' kind is defined.  Your definition
> of the 'referencing' kind doesn't define of those reference properties
> -- so this likely won't work as you're expecting.  Perhaps if you
> explain how exactly you're using this we could offer some alternative
> ideas.
>
> You could simply do something like this:
>
> class LTMean( db.Expando ):
> # your definition
> def find_referrers(self, prop):
> return LTMean().all().filter(prop, self)
>
> Then, instead of ltmean_entity.some_collection_name, you'll do
> ltmean_entity.find_referrers('some_thing').
>
> Robert
>
> 2011/4/18 saintthor :
>
> > how add an attribute of ReferenceProperty to Expando then?
>
> > On 4月18日, 下午2时36分, "Nick Johnson (Google)" 
> > wrote:
> >> Hi,
>
> >> 'collection_name' is a property of the ReferenceProperty class. You can't
> >> have a collection_name if you don't have a reference property.
>
> >> -Nick Johnson
>
> >> On Mon, Apr 18, 2011 at 2:04 AM, saintthor  wrote:
> >> > class LTMean( db.Expando ): #Expando
> >> >Info = db.TextProperty()
>
> >> > def NewMean( k, v ):
> >> >newMean = LTMean()
> >> >setattr( newMean, k, LTMean( key_name = v ).key() )
> >> >newMean.put()
>
> >> > ==
> >> > how to set the collection_name?
>
> >> > --
> >> > 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.
>
> >> --
> >> Nick Johnson, Developer Programs Engineer, App Engine
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

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



[google-appengine] Problem with catching data from Twitter by Twitter Search API

2011-04-18 Thread Jimmy
I used to catch data from Twitter by the Twitter Search API. But it's
seems like be prohibited since 1st  Apr.
Twitter official document says that "An application must have a static
IP to be eligible for whitelisting. This means the majority of cloud
platforms, including Google App Engine, cannot be whitelisted."
I want to know is there any way to solve this problem.

Thank you very much.

-Jimmy Lin

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



Re: [google-appengine] Problem with catching data from Twitter by Twitter Search API

2011-04-18 Thread Barry Hunter
Get yourself a static IP address.

Easiest way it probably to use a cheap VM somewhere to act as a proxy.

On 18 April 2011 15:04, Jimmy  wrote:
> I used to catch data from Twitter by the Twitter Search API. But it's
> seems like be prohibited since 1st  Apr.
> Twitter official document says that "An application must have a static
> IP to be eligible for whitelisting. This means the majority of cloud
> platforms, including Google App Engine, cannot be whitelisted."
> I want to know is there any way to solve this problem.
>
> Thank you very much.
>
> -Jimmy Lin
>
> --
> 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.
>
>

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



Re: [google-appengine] Help a Newbie and earn Karma

2011-04-18 Thread Jeremy Foote
Thanks very much!

On Mon, Apr 18, 2011 at 3:55 AM, djidjadji  wrote:

> The method dict.values() is the same as your mapToList(dictionary)
> function, but a lot faster.
>
> 2011/4/14 Jeremy Foote :
> > I am new to App Engine, new to Python, and new to programming. :)
> > Unfortunately, I don't know what I don't know, so this question will be
> more
> > vague than I would like.
>
> --
> 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.
>
>

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



[google-appengine] Re: get_current_user() returns None in blobstore upload handler

2011-04-18 Thread JH
I'm using gaesessions and the cookie data seems to be passed through
from gae handler to my handler, if that could help you at all..

On Apr 15, 4:17 pm, "Ikai Lan (Google)"  wrote:
> The upload handler isn't called by your end user. It's called by our backend
> systems after the upload has been processed by another service that doesn't
> have the 30 second deadline or size limits. You'll probably want to generate
> a token on the server side in the same handler that creates the blobstore
> upload URL, associate that with the user, then read this value in the upload
> handler to map it back to your user.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine
>
> On Thu, Apr 14, 2011 at 8:10 AM, Justin Waugh wrote:
>
>
>
>
>
>
>
> > I ran into an issue recently when I first tried to use the blobstore,
> > in that when the blobstore internally redirects to the upload handler
> > it may not be specified as requiring login, unless it is admin login.
>
> > I guess I have 3 questions:
>
> > 1.  Why is that restriction in place?  I would certainly like to
> > require a user login for my upload handler
>
> > 2.  Why does get_current_user() return None in the upload handler if
> > the user has previously logged in?  If I post to the same handler
> > without going through the blobstore first, the get_current_user()
> > returns the user.
>
> > 3.  What would the best practice then be for validating that the user
> > is authorized for a blobstore upload handler?
>
> > Thanks for the help!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.

-- 
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] 3000 files

2011-04-18 Thread vincent
Hey Guys,
I started to build my app on google app engine and apparently my app
is 3700 files already.
As i started 2 days ago it feels a bit weird. I use django 1.2 in a
zip file and when I run the commands :

#!/bin/bash
cd `dirname $0`
echo "number of folders :"
ls -lR | grep "dr" | wc -l
echo "number of files :"
ls -lR | grep "\-r" | wc -l
echo "number of files + folder + symlink"
ls -alR | wc -l

it says :

number of folders :
  21
number of files :
  91
number of files + folder + symlink
 226

When I try to commit my code it always say :

Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Scanned 1500 files.
Scanned 2000 files.
Scanned 2500 files.
Scanned 3000 files.
Scanned 3500 files.
Initiating update of app: x, version: 1
Could not guess mimetype for static/.DS_Store.  Using application/
octet-stream.
Cloning 4 static files.
Cloning 3753 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Cloned 800 files.
Cloned 900 files.
Cloned 1000 files.
Cloned 1100 files.
Cloned 1200 files.
Cloned 1300 files.
Cloned 1400 files.
Cloned 1500 files.
Cloned 1600 files.
Cloned 1700 files.
Cloned 1800 files.
Cloned 1900 files.
Cloned 2000 files.
Cloned 2100 files.
Cloned 2200 files.
Cloned 2300 files.
Cloned 2400 files.
Cloned 2500 files.
Cloned 2600 files.
Cloned 2700 files.
Cloned 2800 files.
Cloned 2900 files.
Cloned 3000 files.
Cloned 3100 files.
Cloned 3200 files.
Cloned 3300 files.
Rolling back the update.
Error 400: --- begin server output ---
Max number of files and blobs is 3000.

What am I missing ? any idea ? is google engine counting my files in
my django zip ?

thanks for you help !!

Vincent

-- 
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] Post a multipart-form with binary data from GAE to Facebook

2011-04-18 Thread Leo Zhu
Hi All,
  I want to post a form to another site(Facebook.com) on App Engine.
Well, the form contains a file with binary data.
  e.g.

   Content-Type: multipart/form-data; boundary=--
bounDary--

   --bounDary--
   Content-Disposition: form-data; name="title"
   Title Here
   --bounDary--
   Content-Disposition: form-data; name="content";
filename="Picture.png"
   --here follows the binary data for picture.png


My question is:
   Since GAE does not support streaming request, how can I perform
such a request on it.


Thanks in advance
Leo

-- 
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] Post a multipart-form with binary data from GAE to Facebook

2011-04-18 Thread Leo Zhu
Hi Team,
 I want to post a form to another site(Facebook.com) on App Engine.
Well, the form contains a file with binary data.
 e.g.

  Content-Type: multipart/form-data; boundary=--
bounDary--

  --bounDary--
  Content-Disposition: form-data; name="title"
  Title Here
  --bounDary--
  Content-Disposition: form-data; name="content";
filename="Picture.png"
  --here follows the binary data for picture.png


My question is:
  Since GAE does not support streaming request, how can I perform
such a request on it.


Thanks in advance
Leo

-- 
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] Temporary Blobstore Error

2011-04-18 Thread Kim
Hello,

I have been getting a huge number of blobstore errors today when
trying to form-post with create_upload_url(). The function clearly
works (sometimes), but with close to a 90% failure rate. It's clear
from a bit of searching that I am not alone in this, but my main issue
isn't with the error itself, but rather that the System Status is
pretending like everything is fine.

Google, the fact that your product is having problems is annoying but
slightly understandable (it is a Beta product after all, even if you
are charging me for it), but you need to owe up to your availability
issues. Developers need to be able to make informed decisions about
whether or not to use App Engine, and right now you are misleading us
by pretending to have a far higher uptime than is reflected in
reality.

You have an amazing product here. Myself along with countless other
developers are incredibly impressed by what you have accomplished. The
fact that we are developing app after app on a platform that throws so
many 500-errors and so much sporadic latency our way is a great
testament to that. If it wasn't such a good idea in theory, we
wouldn't be here. It's high time you took availability more seriously.

I have read time and time again that the sporadic 500-errors are to be
considered as "working as intended", but I don't think I will ever be
willing to live with that. _Please_ refocus your development efforts
from new features to stability. The features don't have value without
stability.

// Kim Lundgren

-- 
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: Post a multipart-form with binary data from GAE to Facebook

2011-04-18 Thread Leo Zhu
Hi 
Thank you. It helps. 
In Java, we can use HTTPUrlConnection to do this. App Engine's 
implementation of URLConnection does not maintain a persistent connection 
with the remote host. When the app sets request data or writes to the output 
stream, the request data is kept in memory. When the app accesses any data 
about the response, such as getting the input stream (or calling the 
connect() method), App Engine calls the URL Fetch service with the request 
data, gets the response, closes the connection and returns the response 
data.

How can I keep a request's stream data in memory with Python?

Leo

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



Re: [google-appengine] Re: AppEngine IPs in SpamHaus

2011-04-18 Thread Ikai Lan (Google)
I wish we could move faster on this. We're moving as quickly as we can.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Sat, Apr 16, 2011 at 7:02 PM, Kyle Jensen  wrote:

> Any update on this issue?  The affected IPs are still in SpamHaus,
> which causes problems for both OpenDNS and email delivery for email
> containing links to names resolving to the affected IPs.
> -Kyle
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
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] Channels documentation error

2011-04-18 Thread Andrei
I think it is supposed to be for Java app engine side not JavaScript
client

Quote of doc part
In order to initiate the process of creating a channel, JavaScript
client pages call the ChannelServiceFactory.getChannelService() method
and get a ChannelService() object. Then they use the object's
createChannel() method and get a token that the client page can use to
connect to the channel. When calling createChannel(), they send a
Client ID that uniquely identifies the client to the server.

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



Re: [google-appengine] 3000 files

2011-04-18 Thread Barry Hunter
I dont think ls -R will decend into hidden directories.

Try

find -type f

instead.

On 17 April 2011 19:44, vincent  wrote:
> Hey Guys,
> I started to build my app on google app engine and apparently my app
> is 3700 files already.
> As i started 2 days ago it feels a bit weird. I use django 1.2 in a
> zip file and when I run the commands :
>
> #!/bin/bash
> cd `dirname $0`
> echo "number of folders :"
> ls -lR | grep "dr" | wc -l
> echo "number of files :"
> ls -lR | grep "\-r" | wc -l
> echo "number of files + folder + symlink"
> ls -alR | wc -l
>
> it says :
>
> number of folders :
>      21
> number of files :
>      91
> number of files + folder + symlink
>     226
>
> When I try to commit my code it always say :
>
> Scanning files on local disk.
> Scanned 500 files.
> Scanned 1000 files.
> Scanned 1500 files.
> Scanned 2000 files.
> Scanned 2500 files.
> Scanned 3000 files.
> Scanned 3500 files.
> Initiating update of app: x, version: 1
> Could not guess mimetype for static/.DS_Store.  Using application/
> octet-stream.
> Cloning 4 static files.
> Cloning 3753 application files.
> Cloned 100 files.
> Cloned 200 files.
> Cloned 300 files.
> Cloned 400 files.
> Cloned 500 files.
> Cloned 600 files.
> Cloned 700 files.
> Cloned 800 files.
> Cloned 900 files.
> Cloned 1000 files.
> Cloned 1100 files.
> Cloned 1200 files.
> Cloned 1300 files.
> Cloned 1400 files.
> Cloned 1500 files.
> Cloned 1600 files.
> Cloned 1700 files.
> Cloned 1800 files.
> Cloned 1900 files.
> Cloned 2000 files.
> Cloned 2100 files.
> Cloned 2200 files.
> Cloned 2300 files.
> Cloned 2400 files.
> Cloned 2500 files.
> Cloned 2600 files.
> Cloned 2700 files.
> Cloned 2800 files.
> Cloned 2900 files.
> Cloned 3000 files.
> Cloned 3100 files.
> Cloned 3200 files.
> Cloned 3300 files.
> Rolling back the update.
> Error 400: --- begin server output ---
> Max number of files and blobs is 3000.
>
> What am I missing ? any idea ? is google engine counting my files in
> my django zip ?
>
> thanks for you help !!
>
> Vincent
>
> --
> 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.
>
>

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



Re: [google-appengine] Re: email sent by GAE would be regarded as spam for some email services

2011-04-18 Thread Ikai Lan (Google)
Points taken. I'll bring up the issue next chance I get.

I can't make any promises though, because some things that should be easy
are actually really difficult.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Sat, Apr 16, 2011 at 3:50 PM, nickmilon  wrote:

> +1
>
> On Apr 16, 10:06 pm, Adam Sah  wrote:
> > Ikai-- totally agree re:bulk email, but please please please add DKIM,
> which
> > (I'm told) is 90% of the solution for
> > enterprise/extranet apps that need to use email for workflow.  The Big
> > Reason I chose AppEngine was to get
> > an integrated solution from one vendor: forcing me to use multiple
> vendors
> > makes GAE far less compelling.
> >
> > http://code.google.com/p/googleappengine/issues/detail?id=3161
> >
> > thanks again!
> > 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.
>
>

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



Re: [google-appengine] File API write size limit

2011-04-18 Thread Ikai Lan (Google)
Good tip. There are very few APIs where the 1MB limit does not apply. We're
working on ways to, at the very least, hide this from users.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Sun, Apr 17, 2011 at 2:50 PM, Mars  wrote:

> Thought someone might be interested in knowing this. When using the
> new File API to write blob, the normal 1MB per blobstore data op limit
> applies. In other word, if you ever need to write blobs larger than
> 1MB, make sure you do it in batches. Here's a simple example on how to
> do that
>
>
>with files.open(blob, 'a') as f:
>write_len = 1024*1024
>for i in range(0, len(content), write_len):
>f.write(content[i:i+write_len])
>
>
> where 'content' is the large binary stream to be written
>
> --
> 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.
>
>

-- 
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: Unable to retrieve entities with OpenID User objects, need a workaround

2011-04-18 Thread pjesi
Any feedback on this?

On Apr 14, 8:12 pm, Viðar Svansson  wrote:
> Another question, is there any way to "peak" into the corrupted entity?
> I know the ids from a query but I would like to have the data before I
> delete it.
>
>
>
>
>
>
>
> On Wed, Apr 13, 2011 at 9:30 PM, pjesi  wrote:
> > Hi,
>
> > It seems that it is not possible to associate an entity to a User
> > instance if the user authenticated with OpenID and did not provide an
> > email.
>
> > From the docs, it seems to be possible to create a User instance
> > without an email using federated_identity:
>
> > users.User(federated_identity="http://example.com/id/ajohnson";)
> >http://code.google.com/appengine/docs/python/users/userobjects.html
>
> > So basically I can log in using OpenID, put something in the datastore
> > that references the user from users.get_current_user(), and be left
> > with a broken instance.
>
> > This is discussed in an old thread here:
> >http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> > It was suggested that if the user object does not contain an email,
> > one should ask the user from that. But can the email provided by user
> > input be used to associate him with the current user object?
>
> > I haven't found any documentation on how to fix this. Can I set the
> > email address to the user object and will that help me to lookup any
> > entities that the user created?
>
> > Example:
> > 1. User logged in using his blogger.com OpenID, no email was provided.
> > The app created a Profile instance that references that apparently
> > broken User instance.
>
> > 2.User visits a restricted page that looks up his Profile with using
> > the current_user object, the query finds the Profile entity but fails
> > to create an object because of UserNotFoundError exception.
>
> > Can the app catch this, ask the user for email, and fix the entity? If
> > so, how?
>
> > To prevent this happening in the future, can the app ask the user to
> > provide email before creating the Profile object in the first place
> > and somehow set the email so that the Profile instance will not raise
> > an exception in the future?
>
> > Thanks,
> > Viðar

-- 
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: 20 seconds problem

2011-04-18 Thread vlad
GAE folks actually answered this question some months back. What they said 
is backoff specified in queue.yaml only a cue for the scheduler. Scheduler 
does not come back to check the queue to see if retries are needed UNLESS it 
needs to do that anyway. If there are other tasks pending to be fired 
between moment your task failed and time specified in your backoff schedule 
, then you MAY see backoffs to behave closer to what you specified in 
queue.yaml
In other words, IF you happen to run a lot of tasks then your average 
behavior will be better than an isolated test case you are focusing on.  

This is very frustrating. I would be happy to pay more CPU cost to make 
TaskQueue behave more predictably. Star 
http://code.google.com/p/googleappengine/issues/detail?id=4901 if you want 
that too.

Bottom line: You can workaround this problem by firing a dummy task on the 
same queue every second.

Btw, i think  you are right assuming GAE folks are not terribly proud of 
this design :)

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



Re: [google-appengine] Re: etags and webkit's response -- any way to disable in GAE?

2011-04-18 Thread Wesley C (Google)
the problem with using if-none-match with ETags is fixed:
http://code.google.com/p/googleappengine/issues/detail?id=575

however, if-modified-since is NOT currently supported, so if this is
your issue, pls star the follow-up issue:
http://code.google.com/p/googleappengine/issues/detail?id=4838

best regards,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
   http://corepython.com

wesley.chun : wesc+api at google.com : @wescpy
developer relations :: google cloud products

-- 
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] Appropriate way to save hundreds of thousands of ids per user

2011-04-18 Thread nischalshetty
Every user in my app would have thousands of ids corresponding to them. I 
would need to look up these ids often.

Two things I could think of:

1. Put them into Lists - (drawback is that lists have a maximum capacity of 
5000(hope I'm right here) and I have users who would need to save more than 
150,000 ids)
2. Insert each id as a unique record in the datastore (too much of data? as 
it would be user * ids of all users). Can I batch put 5000 records at a 
time? Can I batch get at least 100 - 500 records at a time?

Is there any other way to do this? I hope my question's clear. Your 
suggestions are greatly appreciated.

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