[google-appengine] Re: App Engine SDK 1.4.2 is out!

2011-02-12 Thread Dan Dubois
The update as arrived. :-)

I can finally restart development of my app since the JSP mapping bug 
appeared. 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.



Re: [google-appengine] WTF... new SDK and new local datastore ???

2011-02-12 Thread Wim den Ouden
indicates high replication datastore

2011/2/12 Gopal Patel 

>
> what is this s~ doing there anyway ?
>
> On Sat, Feb 12, 2011 at 6:21 AM, djidjadji  wrote:
>
>> I had a problem that the python 1.3.8 SDK was unable to write in a
>> 1.3.7 SDK datastore.
>> They must have changed something because SDK 1.4.1 was able to
>> read/write a 1.3.7 SDK datastore.
>>
>> 2011/2/11 Matija Jerković :
>> > I am using java version. I remember that python version didn't break
>> > datastore file on sdk change, but for java version I am not sure if this
>> > happened before.
>>
>> --
>> 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.
>



-- 
gr
Wim den Ouden
Custom applications, based on Google App Engine
.
Free open source E-commerce/E-bookkeeping/E-business framework (web)
apps
.

-- 
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] Blobstore file upload with other form values

2011-02-12 Thread theone
Hello,

I want to keep user information and files with blobstore but I could
not do it.
I have a structure like:

class Expert(db.Model):
N = db.StringProperty(indexed=True, required=True,
verbose_name='Name')
S = db.StringProperty(indexed=True, required=True,
verbose_name='Surname')
BD = db.DateProperty(indexed=True, required=True, verbose_name='Birth
Date')
EY = db.IntegerProperty(indexed=True, verbose_name='Years of
Experience')

class AddExpert(webapp.RequestHandler):
upload_url = blobstore.create_upload_url('/upload')
doRender(self, "addexpert.htm", {'upload_url': upload_url } )

and html form like:



  Name
  Surname


when I tried to upload my data and redirect my page:

class Upload(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('file')
blob_info = upload_files[0]
blob = blob_info.key()
N = self.request.get('name')
S = self.request.get('surname')
..
self.redirect('/')

It redirects to an empty page. It saves the file at __BlobInfo__ (I
could see it at SDK console) but it does not save other information.

Am I missing any point?
Thanks for helps in advance.



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



[google-appengine] Re: My server can't reach app engine for being in a "forbidden country" (it's in Atlanta)

2011-02-12 Thread Max Harper
Silence. Google employees, please restore my faith in this service by 
responding!  (even if the response is: "you're screwed, get a new VPS")

Here's my traceroute, which (using a geo-location service) shows Atlanta => 
Los Angeles => Mountain View.

max@nea:~/tmp$ traceroute maxharp3r-sandbox.appspot.com
traceroute to maxharp3r-sandbox.appspot.com (74.125.67.141), 30 hops max, 60 
byte packets
 1  63.247.74.43 (63.247.74.43)  0.339 ms  0.330 ms  0.379 ms
 2  63.247.64.153 (63.247.64.153)  18.540 ms  18.636 ms  18.700 ms
 3  209.51.130.209 (209.51.130.209)  0.339 ms  0.349 ms  0.412 ms
 4  aix.pr1.atl.google.com (198.32.132.41)  0.814 ms  0.811 ms  0.789 ms
 5  72.14.233.56 (72.14.233.56)  0.670 ms  55.190 ms  0.586 ms
 6  72.14.239.127 (72.14.239.127)  1.578 ms 72.14.239.131 (72.14.239.131)  
23.984 ms 209.85.254.247 (209.85.254.247)  1.125 ms
 7  209.85.255.194 (209.85.255.194)  4.928 ms 209.85.255.190 
(209.85.255.190)  1.062 ms 209.85.255.198 (209.85.255.198)  4.785 ms
 8  gw-in-f141.1e100.net (74.125.67.141)  1.105 ms  1.452 ms  1.934 ms


-- 
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: My server can't reach app engine for being in a "forbidden country" (it's in Atlanta)

2011-02-12 Thread jonsm...@gmail.com
On Sat, Feb 12, 2011 at 9:22 AM, Max Harper  wrote:
> Silence. Google employees, please restore my faith in this service by
> responding!  (even if the response is: "you're screwed, get a new VPS")

Not with Google, but maybe it got into your DOS protection file...
http://code.google.com/appengine/docs/java/config/dos.html

There is a way to add IPs to this from the console.


>
> Here's my traceroute, which (using a geo-location service) shows Atlanta =>
> Los Angeles => Mountain View.
>
> max@nea:~/tmp$ traceroute maxharp3r-sandbox.appspot.com
> traceroute to maxharp3r-sandbox.appspot.com (74.125.67.141), 30 hops max, 60
> byte packets
>  1  63.247.74.43 (63.247.74.43)  0.339 ms  0.330 ms  0.379 ms
>  2  63.247.64.153 (63.247.64.153)  18.540 ms  18.636 ms  18.700 ms
>  3  209.51.130.209 (209.51.130.209)  0.339 ms  0.349 ms  0.412 ms
>  4  aix.pr1.atl.google.com (198.32.132.41)  0.814 ms  0.811 ms  0.789 ms
>  5  72.14.233.56 (72.14.233.56)  0.670 ms  55.190 ms  0.586 ms
>  6  72.14.239.127 (72.14.239.127)  1.578 ms 72.14.239.131 (72.14.239.131)
> 23.984 ms 209.85.254.247 (209.85.254.247)  1.125 ms
>  7  209.85.255.194 (209.85.255.194)  4.928 ms 209.85.255.190
> (209.85.255.190)  1.062 ms 209.85.255.198 (209.85.255.198)  4.785 ms
>  8  gw-in-f141.1e100.net (74.125.67.141)  1.105 ms  1.452 ms  1.934 ms
>
> --
> 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.
>



-- 
Jon Smirl
jonsm...@gmail.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] Re: My server can't reach app engine for being in a "forbidden country" (it's in Atlanta)

2011-02-12 Thread dan
Thanks for the suggestion. We have no blacklist dos.yaml. Our blacklist 
shows no rejected visitors in the console.

On Saturday, February 12, 2011 6:33:09 AM UTC-8, Jon Smirl wrote:
>
> On Sat, Feb 12, 2011 at 9:22 AM, Max Harper  wrote:
> > Silence. Google employees, please restore my faith in this service by
> > responding!  (even if the response is: "you're screwed, get a new VPS")
>
> Not with Google, but maybe it got into your DOS protection file...
> http://code.google.com/appengine/docs/java/config/dos.html
>
> There is a way to add IPs to this from the console.
>

-- 
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: App Engine SDK 1.4.2 is out!

2011-02-12 Thread César de Tassis Filho
The update on the SVN repository is missing (
http://code.google.com/p/googleappengine/source/browse/trunk/python/VERSION
).

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



[google-appengine] Re: Is it impossible to guarantee a put()

2011-02-12 Thread stevep
Thanks Calvin and Robert (as always).

Calvin: I initially did my puts() in the handler. Easy and clean as
you suggest until your put that normally takes 200ms is hit by a
series of 503s because of infrastructure issues Google controls (not
you).

Think of your client's put() as your customer's head, and the 503 as
the brick wall. You can beat the head against the wall handling all
the various scenarios via dialogs. That's an option yes, but my
customers are not technically inclined, and will be unhappy. Also, you
**cannot** assume this write will happen. Very, very likely the
frustrated customer closes her browser window. Then you're SOL.

My option using the task queue was to simply send the put there, and
give the client the means to verify its occurrence. If the
infrastructure is thrashing away with 503s, then the client can easily
determine that the customer needs a nice dialog saying she will be
apprised via email when the record is written.

I'm happy: record is not lost. Customer is happy: she has an
assurance, and is free to get on with her life.

Conclusion: it is becoming apparent to me that GAE cannot provide the
means for a developer to ensure a record is written. To minimize risk,
I am now setting up a high replication handler writing to db class
that has the least possible number of indices. AND, I get to set up
all those client dialogs.

So, so much easier if there would be one task queue were I could send
the transaction data from my client's post, and take advantage of all
the benefits of the TQ.

Sorry for the rant-like tone -- too little sleep last few days.
stevep

Robert:
>   Instead could catch timeout, contention, or similar exceptions and
> retry the put.  You might also wan to set an limit on the RPC timeout
> so that you'll have time to retry the write at least once within the
> 30 second request limit.   If you still get an error after some number
> of retries, notify the client.


Calvin:
> What I'm not understanding from the original question is why can't you do
> the put in the request handler?  That way if there is a failure (and there
> will always be occasional failures) you can catch the exception and return
> an error to the client.

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



[google-appengine] Re: App Engine SDK 1.4.2 is out!

2011-02-12 Thread Colin Hawkett
Thanks Ikai - great release! One question, can a queue that is rate limited 
to 1 concurrent task be seen as a FIFO serialised queue? i.e. is order 
guaranteed, even if the current running task fails it goes back to the front 
of the queue? I'm guessing you don't guarantee this behaviour but thought 
I'd check. Would be an excellent feature. Cheers,

Colin

-- 
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] LIFO key name strategy?

2011-02-12 Thread Joseph Letness
Hi everybody, I was wondering if anybody has any good ideas for
generating LIFO (Last In FIrst Out) key names.  I can't use a
composite index since it would explode with my use case.

Currently, I can think of two methods:

Use the auto generated id (which, I believe is accumulative), query
for keys only and reverse the list in memory.  This would be fine if I
can guarantee that my entire result set can be handled within a single
request.

OR

Create a de-accumulator Entity in the datastore and have it count down
from some reasonably high integer and create my key name with that (a
composite of the de-accumulation and the entity nam).  The draw back
for this method is that I'm incurring an additional read-write every
time a new LIFO entity is created and possible contention on the de-
accumulator if I run it in a transaction (I haven't decided if
consistency of the de-accumulation is imperative for my use case yet).

I'm using Python.  If anybody has any better ideas it would be much
appreciated!

Thanks,

--Joe


-- 
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] App Engine SDK 1.4.2 is out!

2011-02-12 Thread Sandeep Koduri
Thanks for the update, we were eager about this.

Thinking why the version release updates of python went after java ones,
different from regular process.
This version helps us lot


On Sat, Feb 12, 2011 at 1:50 AM, Ikai Lan (Google)  wrote:

> Hey everyone,
>
> The moment you've been waiting for is here. Drum roll please ... *drum
> roll* SDK 1.4.2 is out! I know you've all been anxious to get your hands on
> this release (many of you jumping the gun and download the SDK before the
> previous announcement). You won't be disappointed. Here's the official blog
> post:
>
>
> http://googleappengine.blogspot.com/2011/02/app-engine-142-sdk-api-updates-and.html
>
>
> One
> thing you'll notice is that Prospective Search (Matcher API) isn't in this
> release even though it was in the prerelease SDK. We're going to try to get
> it out for one of the upcoming releases. Apologies for those of you wanted
> to use it - it's coming soon, I promise!
>
> Release notes for 1.4.2 are below. As usual, you can update the SDK through
> all the standard means or via the downloads page:
> http://code.google.com/appengine/downloads.html
>
> Note: Some of you who
> downloaded the Java SDK prior to this announcement actually got a version
> that was missing the unit testing jars. If you downloaded the Java SDK over
> ~30 minutes ago and are wondering where all the testing jars went, please go
> ahead and download it again (if you didn't notice that the testing jars were
> missing ... well, shame on you, you should be writing unit tests).
>
> Java Version 1.4.2
> =
> - You can now vacuum datastore indexes with the Java SDK.
> - The XMPP API was updated to include presence and allow subscriptions.
> - The Task Queue now supports programmatic deleting of tasks.
> http://code.google.com/p/googleappengine/issues/detail?id=2588
> - The maximum rate per queue at which tasks are processed has been
> increased to
>   100 task per second.
> - The maximum number of concurrent requests for a single queue can be
> specified
>   in the application's queue.xml. This provides an additional easy-to-use
> form
>   of rate limiting. The current number of running tasks is also displayed
> in
>   the Admin Console.
> - Metadata queries in the Datastore now support cursors.
> - Admin Console logs viewer now displays time as -MM-DD HH:MM:SS.mmm.
> - Added a warning when an admin tries to upload a queue.yaml where the
> number
>   of new queues and the number of disabled queues exceeds 100.
> - Added a putIfUntouched() method to the Memcache API.
> http://code.google.com/p/googleappengine/issues/detail?id=2139
> - Added JAX-WS support for writing SOAP clients and SAAJ support for
> writing
>   SOAP servers. JAX-WS for SOAP servers is not yet supported.
> - The Mail API added KML and KMZ files as allowed attachments.
> - Fixed an issue where mail from @appid.appspotmail.com did not work when
>   sending mail to app admins.
> - Fixed an issue where the SDK did not enforce the 100 task limit for the
> Task
>   Queue.
> http://code.google.com/p/googleappengine/issues/detail?id=3296
> - Fixed an issue where the Java SDK URLFetch did not support 32MB response
>   sizes.
> http://code.google.com/p/googleappengine/issues/detail?id=4215
> - Fixed an issues where  mappings in web.xml were broken.
> http://code.google.com/p/googleappengine/issues/detail?id=4216
>
> Python Version 1.4.2
> 
> - The XMPP API was updated to include presence and allow subscriptions.
> - The Task Queue now supports programmatic deleting of tasks.
> http://code.google.com/p/googleappengine/issues/detail?id=2588
> - The maximum rate per queue at which tasks are processed has been
> increased to
>   100 tasks per second.
> - The maximum number of concurrent requests for a single queue can be
> specified
>   in the application's queue.yaml. This provides an additional easy-to-use
> form
>   of rate limiting. The current number of running tasks is also displayed
> in
>   the Admin Console.
> - Metadata queries in the Datastore now support cursors.
> - Admin Console logs viewer now displays time as -MM-DD HH:MM:SS.mmm.
> - Added a warning when an admin tries to upload a queue.yaml where the
> number
>   of new queues and the number of disabled queues exceeds 100.
> - Django 1.2.5 is available via use of the use_library() declaration. This
>   version of Django has also been added to the Python SDK.
> - Added builtin support for the deferred library.
> - If Python Precompilation fails, an error will be printed but the app will
>   still be uploaded.
> - Added a --disable_sdk_update_check command line flag to the
> dev_appserver.
> - The Mail API added KML and KMZ files as allowed attachments.
> - Fixed an issue where the datastore copy functionality did not work if
> writes
>   were di

[google-appengine] Re: LIFO key name strategy?

2011-02-12 Thread Calvin
If your key name was the based off of datetime.utcnow().isoformat() you 
could always get the last entity created by doing a query like this:

last_created = model.all().filter('__key__ <', db.Key.from_path('model', 
datetime.utcnow().isoformat())).get()

and you could get the next newest by finding the entity with a __key__ < 
last_created.key().

But beware of monotonically increasing values:
http://ikaisays.com/2011/01/25/app-engine-datastore-tip-monotonically-increasing-values-are-bad/


-- 
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: Attempting to use Jing for XML Document Schema. Works on Local. Errors when Deployed.

2011-02-12 Thread Austin Dworaczyk Wiltshire
Does no one have any ideas? How about why does it work on my local
machine, but fail when deployed?

Or is there a way to check and see if the jing.jar is loaded properly?

On Feb 10, 6:46 pm, Austin Dworaczyk Wiltshire
 wrote:
> Sorry for the long title.
>
> So, here is the run down. I'm essentially building a java Document tree by
> adding nodes and the like. I have a particular RelaxNG schema that I want
> Document to build against.
>
> Now, I can load and create the corresponding SchemaFactory and Schema
> instances on my local machine. I then add them to my Document.
>
> This all works when running on my local machine (Mac Snow Leopard, Eclipse
> Java EE Helios, latest Google Web Toolkit plugin). However, when I deploy to
> App Engine, I get the following error:
>
> #
> 2011-02-10 18:21:22.253 /labauthoringtool/genXML 500 1778ms 1913cpu_ms 0kb
> Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13)
> Gecko/20101203 Firefox/3.6.13,gzip(gfe)
> See details
>
> 99.65.209.224 - - [10/Feb/2011:18:21:22 -0800] "POST
> /labauthoringtool/genXML HTTP/1.1" 500 93
> "http://2.csc307g3lat.appspot.com/"; "Mozilla/5.0 (Macintosh; U; Intel Mac OS
> X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe)"
> "2.csc307g3lat.appspot.com" ms=1778 cpu_ms=1913 api_cpu_ms=0
> cpm_usd=0.053268 loading_request=1
>
> #
> W 2011-02-10 18:21:22.050
>
> edu.calpoly.cpe307.team3.weblat.server.LabToXMLGenerator parseLab: help!
>
> #
> W 2011-02-10 18:21:22.052
>
> edu.calpoly.cpe307.team3.weblat.server.LabToXMLGenerator parseLab: the
> property is: null
>
> #
> W 2011-02-10 18:21:22.052
>
> edu.calpoly.cpe307.team3.weblat.server.LabToXMLGenerator parseLab: the new
> property is: com.thaiopensource.relaxng.jaxp.CompactSyntaxSchemaFactory
>
> #
> E 2011-02-10 18:21:22.240
>
> javax.servlet.ServletContext log: Exception while dispatching incoming RPC
> call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public
> abstract java.lang.String
> edu.calpoly.cpe307.team3.weblat.client.LabToXMLGeneratorService.convertToXML(org.web_ide.shared.lab.Lab)'
> threw an unexpected exception: java.lang.IllegalArgumentException: No
> SchemaFactory that implements the schema language specified 
> by:http://relaxng.org/ns/structure/1.0could be loaded
>     at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
>     at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
>     at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
>     at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
>     at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>     at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
>     at
> com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>     at
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>     at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>     at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>     at
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>     at org.mortbay.jetty.Server.handle(Server.java:326)
>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>     at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>     at
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>     at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
>     at
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
>     at
> com.google.apphost

[google-appengine] Re: Attempting to use Jing for XML Document Schema. Works on Local. Errors when Deployed.

2011-02-12 Thread Calvin
Have you posted on the Java-specific group?
http://groups.google.com/group/google-appengine-java

Also, stackoverflow users might know something.

-- 
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] App Engine SDK 1.4.2 is out!

2011-02-12 Thread David Mora
There seems to be a problem (in python) when using the bulk loader:

UnacceptableVersionError: django 1.1 was requested, but 1.2.3.final.0
is already in use
[INFO] An error occurred. Shutting down...

We load django 1.1 directly in app_config.py so it is used across all
mapreduces/pipelines

Would not say it is a issue yet since i have not properly debug it
(hell, is weekend :) ) - if i found more info ill fill up a bug
properly, thought i should share this, tho

On 12 February 2011 14:30, Sandeep Koduri  wrote:
> Thanks for the update, we were eager about this.
> Thinking why the version release updates of python went after java ones,
> different from regular process.
> This version helps us lot
>
> On Sat, Feb 12, 2011 at 1:50 AM, Ikai Lan (Google)
>  wrote:
>>
>> Hey everyone,
>> The moment you've been waiting for is here. Drum roll please ... *drum
>> roll* SDK 1.4.2 is out! I know you've all been anxious to get your hands on
>> this release (many of you jumping the gun and download the SDK before the
>> previous announcement). You won't be disappointed. Here's the official blog
>> post:
>>
>> http://googleappengine.blogspot.com/2011/02/app-engine-142-sdk-api-updates-and.html
>> One thing you'll notice is that Prospective Search (Matcher API) isn't in
>> this release even though it was in the prerelease SDK. We're going to try to
>> get it out for one of the upcoming releases. Apologies for those of you
>> wanted to use it - it's coming soon, I promise!
>> Release notes for 1.4.2 are below. As usual, you can update the SDK
>> through all the standard means or via the downloads
>> page: http://code.google.com/appengine/downloads.html
>> Note: Some of you who downloaded the Java SDK prior to this announcement
>> actually got a version that was missing the unit testing jars. If you
>> downloaded the Java SDK over ~30 minutes ago and are wondering where all the
>> testing jars went, please go ahead and download it again (if you didn't
>> notice that the testing jars were missing ... well, shame on you, you should
>> be writing unit tests).
>> Java Version 1.4.2
>> =
>> - You can now vacuum datastore indexes with the Java SDK.
>> - The XMPP API was updated to include presence and allow subscriptions.
>> - The Task Queue now supports programmatic deleting of tasks.
>>     http://code.google.com/p/googleappengine/issues/detail?id=2588
>> - The maximum rate per queue at which tasks are processed has been
>> increased to
>>   100 task per second.
>> - The maximum number of concurrent requests for a single queue can be
>> specified
>>   in the application's queue.xml. This provides an additional easy-to-use
>> form
>>   of rate limiting. The current number of running tasks is also displayed
>> in
>>   the Admin Console.
>> - Metadata queries in the Datastore now support cursors.
>> - Admin Console logs viewer now displays time as -MM-DD HH:MM:SS.mmm.
>> - Added a warning when an admin tries to upload a queue.yaml where the
>> number
>>   of new queues and the number of disabled queues exceeds 100.
>> - Added a putIfUntouched() method to the Memcache API.
>>     http://code.google.com/p/googleappengine/issues/detail?id=2139
>> - Added JAX-WS support for writing SOAP clients and SAAJ support for
>> writing
>>   SOAP servers. JAX-WS for SOAP servers is not yet supported.
>> - The Mail API added KML and KMZ files as allowed attachments.
>> - Fixed an issue where mail from @appid.appspotmail.com did not work when
>>   sending mail to app admins.
>> - Fixed an issue where the SDK did not enforce the 100 task limit for the
>> Task
>>   Queue.
>>     http://code.google.com/p/googleappengine/issues/detail?id=3296
>> - Fixed an issue where the Java SDK URLFetch did not support 32MB response
>>   sizes.
>>     http://code.google.com/p/googleappengine/issues/detail?id=4215
>> - Fixed an issues where  mappings in web.xml were broken.
>>     http://code.google.com/p/googleappengine/issues/detail?id=4216
>> Python Version 1.4.2
>> 
>> - The XMPP API was updated to include presence and allow subscriptions.
>> - The Task Queue now supports programmatic deleting of tasks.
>>     http://code.google.com/p/googleappengine/issues/detail?id=2588
>> - The maximum rate per queue at which tasks are processed has been
>> increased to
>>   100 tasks per second.
>> - The maximum number of concurrent requests for a single queue can be
>> specified
>>   in the application's queue.yaml. This provides an additional easy-to-use
>> form
>>   of rate limiting. The current number of running tasks is also displayed
>> in
>>   the Admin Console.
>> - Metadata queries in the Datastore now support cursors.
>> - Admin Console logs viewer now displays time as -MM-DD HH:MM:SS.mmm.
>> - Added a warning when an admin tries to upload a queue.yaml where the
>> number
>>   of new queues and the number of disabled queues exceeds 100.
>> - Django 1.2.5 is available via use of the use_library() declarati

Re: [google-appengine] Re: My server can't reach app engine for being in a "forbidden country" (it's in Atlanta)

2011-02-12 Thread Robert Kluin
Submit a production issue, if you have not already.
http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue




Robert






On Sat, Feb 12, 2011 at 09:22, Max Harper  wrote:
> Silence. Google employees, please restore my faith in this service by
> responding!  (even if the response is: "you're screwed, get a new VPS")
>
> Here's my traceroute, which (using a geo-location service) shows Atlanta =>
> Los Angeles => Mountain View.
>
> max@nea:~/tmp$ traceroute maxharp3r-sandbox.appspot.com
> traceroute to maxharp3r-sandbox.appspot.com (74.125.67.141), 30 hops max, 60
> byte packets
>  1  63.247.74.43 (63.247.74.43)  0.339 ms  0.330 ms  0.379 ms
>  2  63.247.64.153 (63.247.64.153)  18.540 ms  18.636 ms  18.700 ms
>  3  209.51.130.209 (209.51.130.209)  0.339 ms  0.349 ms  0.412 ms
>  4  aix.pr1.atl.google.com (198.32.132.41)  0.814 ms  0.811 ms  0.789 ms
>  5  72.14.233.56 (72.14.233.56)  0.670 ms  55.190 ms  0.586 ms
>  6  72.14.239.127 (72.14.239.127)  1.578 ms 72.14.239.131 (72.14.239.131)
> 23.984 ms 209.85.254.247 (209.85.254.247)  1.125 ms
>  7  209.85.255.194 (209.85.255.194)  4.928 ms 209.85.255.190
> (209.85.255.190)  1.062 ms 209.85.255.198 (209.85.255.198)  4.785 ms
>  8  gw-in-f141.1e100.net (74.125.67.141)  1.105 ms  1.452 ms  1.934 ms
>
> --
> 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] Blobstore file upload with other form values

2011-02-12 Thread Robert Kluin
Some thoughts / suggestions:
  1) Check your url to handler mappings. Both in app.yaml and in your
WSGI app definition.
  2) Check the logs to see what urls are actually getting hit.
  3) At some point in the Upload handler you do create and put a new
Expert entity, right?



Robert






On Sat, Feb 12, 2011 at 06:41, theone  wrote:
> Hello,
>
> I want to keep user information and files with blobstore but I could
> not do it.
> I have a structure like:
>
> class Expert(db.Model):
>        N = db.StringProperty(indexed=True, required=True,
> verbose_name='Name')
>        S = db.StringProperty(indexed=True, required=True,
> verbose_name='Surname')
>        BD = db.DateProperty(indexed=True, required=True, verbose_name='Birth
> Date')
>        EY = db.IntegerProperty(indexed=True, verbose_name='Years of
> Experience')
>
> class AddExpert(webapp.RequestHandler):
>                upload_url = blobstore.create_upload_url('/upload')
>                doRender(self, "addexpert.htm", {'upload_url': upload_url } )
>
> and html form like:
>
> 
> 
>  Name name="name" />
>  Surname name="surname" />
> 
>
> when I tried to upload my data and redirect my page:
>
> class Upload(blobstore_handlers.BlobstoreUploadHandler):
>    def post(self):
>        upload_files = self.get_uploads('file')
>        blob_info = upload_files[0]
>        blob = blob_info.key()
>        N = self.request.get('name')
>        S = self.request.get('surname')
>        ..
>        self.redirect('/')
>
> It redirects to an empty page. It saves the file at __BlobInfo__ (I
> could see it at SDK console) but it does not save other information.
>
> Am I missing any point?
> Thanks for helps in advance.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
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] LIFO key name strategy?

2011-02-12 Thread Robert Kluin
Hi Joe,
  What are you actually trying to do?  Is there a single global LIFO
stack, or are there multiple stacks?  How are new items added to the
stack(s)?  In batches to one stack at a time, batches across stacks?
What is the addition rate?  How are items removed / processed from the
stack(s)?  Is there a requirement that the items are precisely ordered
or are some (or small) mis-orderings acceptable?


  Why do you say: " I can't use a composite index since it would
explode with my use case"?

  The auto-generated ids are not strictly increasing.  What would be
fine if you could handle your entire result set in one request?

  Using the current time may also be problematic since the machines
will have slight variations, and in some cases significant variations.


Robert






On Sat, Feb 12, 2011 at 14:38, Joseph Letness  wrote:
> Hi everybody, I was wondering if anybody has any good ideas for
> generating LIFO (Last In FIrst Out) key names.  I can't use a
> composite index since it would explode with my use case.
>
> Currently, I can think of two methods:
>
> Use the auto generated id (which, I believe is accumulative), query
> for keys only and reverse the list in memory.  This would be fine if I
> can guarantee that my entire result set can be handled within a single
> request.
>
> OR
>
> Create a de-accumulator Entity in the datastore and have it count down
> from some reasonably high integer and create my key name with that (a
> composite of the de-accumulation and the entity nam).  The draw back
> for this method is that I'm incurring an additional read-write every
> time a new LIFO entity is created and possible contention on the de-
> accumulator if I run it in a transaction (I haven't decided if
> consistency of the de-accumulation is imperative for my use case yet).
>
> I'm using Python.  If anybody has any better ideas it would be much
> appreciated!
>
> Thanks,
>
> --Joe
>
>
> --
> 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: Is it impossible to guarantee a put()

2011-02-12 Thread Robert Kluin
Hey Steve,
  First, "[t]hink of your client's put() as your customer's head, and
the 503 as the brick wall" is great, it is humorous and accurate
analogy.  I can relate.  And, I also deal with low-write-rate but
extremely high-value writes in some apps.  It is tricky and makes
small failures / blips a much more significant issue.

  In any client-server app, there will occasionally be communication /
server-side issues.  Have you thought about storing data locally on
submit (or only if there is a server-side error) then implementing
some type of start-up recovery logic that will retry the save?  Could
be particularly helpful if you have some way of making the write
idempotent (ie using a key_name). I know it is not perfect but it
could help out a bit.  There are some little tools that might help
with this, like lawnchair (http://westcoastlogic.com/lawnchair/).  If
you couple that with saving via an AJAX call, even in an error
situation the user experience would be at least a little better.

  Another question, how far over the 10K limit are you?  Have you
tried using bzip to compress your data?  Perhaps if you compress the
payload it would be possible to enqueue it in a task?


Robert








On Sat, Feb 12, 2011 at 10:40, stevep  wrote:
> Thanks Calvin and Robert (as always).
>
> Calvin: I initially did my puts() in the handler. Easy and clean as
> you suggest until your put that normally takes 200ms is hit by a
> series of 503s because of infrastructure issues Google controls (not
> you).
>
> Think of your client's put() as your customer's head, and the 503 as
> the brick wall. You can beat the head against the wall handling all
> the various scenarios via dialogs. That's an option yes, but my
> customers are not technically inclined, and will be unhappy. Also, you
> **cannot** assume this write will happen. Very, very likely the
> frustrated customer closes her browser window. Then you're SOL.
>
> My option using the task queue was to simply send the put there, and
> give the client the means to verify its occurrence. If the
> infrastructure is thrashing away with 503s, then the client can easily
> determine that the customer needs a nice dialog saying she will be
> apprised via email when the record is written.
>
> I'm happy: record is not lost. Customer is happy: she has an
> assurance, and is free to get on with her life.
>
> Conclusion: it is becoming apparent to me that GAE cannot provide the
> means for a developer to ensure a record is written. To minimize risk,
> I am now setting up a high replication handler writing to db class
> that has the least possible number of indices. AND, I get to set up
> all those client dialogs.
>
> So, so much easier if there would be one task queue were I could send
> the transaction data from my client's post, and take advantage of all
> the benefits of the TQ.
>
> Sorry for the rant-like tone -- too little sleep last few days.
> stevep
>
> Robert:
>>   Instead could catch timeout, contention, or similar exceptions and
>> retry the put.  You might also wan to set an limit on the RPC timeout
>> so that you'll have time to retry the write at least once within the
>> 30 second request limit.   If you still get an error after some number
>> of retries, notify the client.
>
>
> Calvin:
>> What I'm not understanding from the original question is why can't you do
>> the put in the request handler?  That way if there is a failure (and there
>> will always be occasional failures) you can catch the exception and return
>> an error to the client.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
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: AddAppVersion failed: DEADLINE_EXCEEDED

2011-02-12 Thread satish
Were you able to find out the cause of this error? I am seeing the same 
issue as well

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



[google-appengine] Re: AddAppVersion failed: DEADLINE_EXCEEDED

2011-02-12 Thread satish
Jason, Were able to find out the cause of this error? I am seeing the same 
issue.

-- 
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] Two-factor authentication in GAE

2011-02-12 Thread Kyle Jensen
How will the two-factor authentication announced for services like
Gmail affect GAE?

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



[google-appengine] Re: Attempting to use Jing for XML Document Schema. Works on Local. Errors when Deployed.

2011-02-12 Thread Austin Dworaczyk Wiltshire
Oh! No I haven't. I wasn't aware that there was a Java specific group.
I'll go ahead and post it there.

I was considering the Stack Overflow guys. If I don't have any success
with the Java group, I'll give Stack Overflow a try as well.

Thanks for your help Calvin.

On Feb 12, 4:17 pm, Calvin  wrote:
> Have you posted on the Java-specific 
> group?http://groups.google.com/group/google-appengine-java
>
> Also, stackoverflow users might know something.

-- 
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: Blobstore file upload with other form values

2011-02-12 Thread Doug Anderson
FWIW I'm facing the same problem and I'm reasonably certain the issue is 
simply a limitation of the BlobstoreUploadHandler.  The handler stores 
uploaded blobs perfectly fine and gives your handler the BlobInfo for each 
blob BUT it seems to discard any non file (type='file') form fields.  So if 
you want to upload a text description along with a photo you're out of luck 
(using the blobstore).  I don't actually want the text description stored in 
the blobstore but I'd like it passed to the handler so I can store it in the 
datastore.

PLEASE FIX this blobstore upload issue... please make other (non file) form 
fields available to BlobstoreUploadHandler derived classes.  Thank you!

On a separate note I'm really looking forward to the programmatic access to 
the blobstore that I see listed on the roadmap!

-- 
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: Blobstore file upload with other form values

2011-02-12 Thread theone
I think you are right about BlobstoreUploadHandler limitations. When I
tried something like:
class X(db.Model):
N = db.StringProperty()
S = db.StringProperty()
F = blobstore.BlobReferenceProperty()

class Upload(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('file')
a=upload_files[0]
N = self.request.get('name')
S = self.request.get('sname')
if S:
m=N + S
else:
m=S + N
self.response.out.write(N)
self.response.out.write(S)
a=X(N=m, S=S, F=a)
a.put()
return self.redirect('/')

It worked partly. I mean I put my model to datastore and file to
blobstore. However, it does not writes the thing like:
self.response.out.write(N). What I understand here we cannot use
everything in BlobstoreUploadHandler.

Also if you request the form fields, it does not work.

-- 
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: Blobstore file upload with other form values

2011-02-12 Thread theone
Hi Robert,

Thank you for your advices. I did not checked my logs before you
said.

When I checked my logs, it gives:

w=upload_files[0]
IndexError: list index out of range
INFO 2011-02-13 07:17:39,486 dev_appserver_blobstore.py:328]
Upload handler returned 500
ERROR2011-02-13 07:17:39,486 dev_appserver_blobstore.py:341]
Invalid upload handler response. Only 301, 302 and 303 statuses are
permitted and it may not have a content body.
INFO 2011-02-13 07:17:39,509 dev_appserver.py:3317] "POST /_ah/
upload/agZlcGN2ZGJyHAsSFV9fQmxvYlVwbG9hZFNlc3Npb25fXxi_Agw HTTP/1.1"
500 -

As I understand from it, It could not get the file so it gives list
index out of range error. However, in another application I use the
same structure and it does not give any error.

Any suggestion about that?

On Feb 13, 6:38 am, Robert Kluin  wrote:
> Some thoughts / suggestions:
>   1) Check your url to handler mappings. Both in app.yaml and in your
> WSGI app definition.
>   2) Check the logs to see what urls are actually getting hit.
>   3) At some point in the Upload handler you do create and put a new
> Expert entity, right?
>
> Robert
>
>
>
>
>
>
>
> On Sat, Feb 12, 2011 at 06:41, theone  wrote:
> > Hello,
>
> > I want to keep user information and files with blobstore but I could
> > not do it.
> > I have a structure like:
>
> > class Expert(db.Model):
> >        N = db.StringProperty(indexed=True, required=True,
> > verbose_name='Name')
> >        S = db.StringProperty(indexed=True, required=True,
> > verbose_name='Surname')
> >        BD = db.DateProperty(indexed=True, required=True, verbose_name='Birth
> > Date')
> >        EY = db.IntegerProperty(indexed=True, verbose_name='Years of
> > Experience')
>
> > class AddExpert(webapp.RequestHandler):
> >                upload_url = blobstore.create_upload_url('/upload')
> >                doRender(self, "addexpert.htm", {'upload_url': upload_url } )
>
> > and html form like:
>
> > 
> > 
> >  Name > name="name" />
> >  Surname > name="surname" />
> > 
>
> > when I tried to upload my data and redirect my page:
>
> > class Upload(blobstore_handlers.BlobstoreUploadHandler):
> >    def post(self):
> >        upload_files = self.get_uploads('file')
> >        blob_info = upload_files[0]
> >        blob = blob_info.key()
> >        N = self.request.get('name')
> >        S = self.request.get('surname')
> >        ..
> >        self.redirect('/')
>
> > It redirects to an empty page. It saves the file at __BlobInfo__ (I
> > could see it at SDK console) but it does not save other information.
>
> > Am I missing any point?
> > Thanks for helps in advance.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > 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] Re: Blobstore file upload with other form values

2011-02-12 Thread Doug Anderson
I have to retract my previous post... this does appear to be working
for me.  I can use "self.request.get('description')" to retrieve the
text description form field.  My previous problem was that
name='descripton' was spelled wrong in my html form (missing the last
'i')... doh!

I think your issue is that you lose your "self.response.out.write(N)"
content when you redirect via "return self.redirect('/')"... that
response body content won't survive the redirect (the redirect will
provide its own content).  If you need to return the submitted N and S
content then perhaps you could redirect to a URL that takes the 'a'
object key as a parameter "self.redirect('/' +
urllib.quote(a.key()))".  Of course you'd have to setup your handler
to accept the parameter... but then you could re-retrieve 'a' object
in the handler via a datastore get such as "a = db.get(a_key)"...
assuming 'a_key' is the name of the parameter.


On Feb 13, 1:54 am, theone  wrote:
> I think you are right about BlobstoreUploadHandler limitations. When I
> tried something like:
> class X(db.Model):
>     N = db.StringProperty()
>     S = db.StringProperty()
>     F = blobstore.BlobReferenceProperty()
>
> class Upload(blobstore_handlers.BlobstoreUploadHandler):
>     def post(self):
>         upload_files = self.get_uploads('file')
>         a=upload_files[0]
>         N = self.request.get('name')
>         S = self.request.get('sname')
>         if S:
>             m=N + S
>         else:
>             m=S + N
>         self.response.out.write(N)
>         self.response.out.write(S)
>         a=X(N=m, S=S, F=a)
>         a.put()
>         return self.redirect('/')
>
> It worked partly. I mean I put my model to datastore and file to
> blobstore. However, it does not writes the thing like:
> self.response.out.write(N). What I understand here we cannot use
> everything in BlobstoreUploadHandler.
>
> Also if you request the form fields, it does not work.

-- 
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: Blobstore file upload with other form values

2011-02-12 Thread theone
I don't need to return the values. My problem is that while I am able
to send file with a few form fields, It gives an error using many
fields:
w=upload_files[0]
IndexError: list index out of range
INFO 2011-02-13 07:43:10,884 dev_appserver_blobstore.py:328]
Upload handler returned 500
ERROR2011-02-13 07:43:10,884 dev_appserver_blobstore.py:341]
Invalid upload handler response. Only 301, 302 and 303 statuses are
permitted and it may not have a content body.
INFO 2011-02-13 07:43:10,910 dev_appserver.py:3317] "POST /_ah/
upload/agZlcGN2ZGJyHAsSFV9fQmxvYlVwbG9hZFNlc3Npb25fXxjFAgw HTTP/1.1"
500 -

In both cases I use the same definitions:
upload_files = self.get_uploads('file')
w=upload_files[0]



On Feb 13, 9:35 am, Doug Anderson  wrote:
> I have to retract my previous post... this does appear to be working
> for me.  I can use "self.request.get('description')" to retrieve the
> text description form field.  My previous problem was that
> name='descripton' was spelled wrong in my html form (missing the last
> 'i')... doh!
>
> I think your issue is that you lose your "self.response.out.write(N)"
> content when you redirect via "return self.redirect('/')"... that
> response body content won't survive the redirect (the redirect will
> provide its own content).  If you need to return the submitted N and S
> content then perhaps you could redirect to a URL that takes the 'a'
> object key as a parameter "self.redirect('/' +
> urllib.quote(a.key()))".  Of course you'd have to setup your handler
> to accept the parameter... but then you could re-retrieve 'a' object
> in the handler via a datastore get such as "a = db.get(a_key)"...
> assuming 'a_key' is the name of the parameter.
>
> On Feb 13, 1:54 am, theone  wrote:
>
>
>
>
>
>
>
> > I think you are right about BlobstoreUploadHandler limitations. When I
> > tried something like:
> > class X(db.Model):
> >     N = db.StringProperty()
> >     S = db.StringProperty()
> >     F = blobstore.BlobReferenceProperty()
>
> > class Upload(blobstore_handlers.BlobstoreUploadHandler):
> >     def post(self):
> >         upload_files = self.get_uploads('file')
> >         a=upload_files[0]
> >         N = self.request.get('name')
> >         S = self.request.get('sname')
> >         if S:
> >             m=N + S
> >         else:
> >             m=S + N
> >         self.response.out.write(N)
> >         self.response.out.write(S)
> >         a=X(N=m, S=S, F=a)
> >         a.put()
> >         return self.redirect('/')
>
> > It worked partly. I mean I put my model to datastore and file to
> > blobstore. However, it does not writes the thing like:
> > self.response.out.write(N). What I understand here we cannot use
> > everything in BlobstoreUploadHandler.
>
> > Also if you request the form fields, it does not work.

-- 
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: My server can't reach app engine for being in a "forbidden country" (it's in Atlanta)

2011-02-12 Thread dan
Thanks for the suggestion, will do.

On Saturday, February 12, 2011 7:40:27 PM UTC-8, Robert Kluin wrote:
>
> Submit a production issue, if you have not already.
>
> http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue


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