Prev: Bento 0.0.3 (ex-toydist), a pythonic packaging solution
Next: Pool Module: iterator does not yield consistently with different chunksizes
From: Maciej on 2 Jul 2010 04:06 Hi, I'm writing a small translator using pyparsing library v1.5.2 (http://pyparsing.wikispaces.com/) and I'm using it both from command line and on Google App Engine. Recently I checked one of my samples which runs perfect from CLI against GAE and it throws me "RuntimeError 'maximum recursion depth exceeded'". I did some investigation and found out that recursion limit is the same locally and inside GA (1000). I've also tested it locally decreasing this limit to 900 but the error didn't happen. The problem itself rises inside pyparsing lib, line 995. Does anyone have any clue what that might be? Why the problem is on GAE (even when run locally), when command line run works just fine (even with recursion limit decreased)? Thanks in advance for any help. Soltys
From: David Cournapeau on 2 Jul 2010 05:02 On Fri, Jul 2, 2010 at 5:06 PM, Maciej <one50123164ef19(a)getonemail.com> wrote: > Does anyone have any clue what that might be? > Why the problem is on GAE (even when run locally), when command line > run works just fine (even with recursion limit decreased)? > Thanks in advance for any help. Most likely google runs a customized python, with different settings to avoid requests to take too long. I doubt there is much you can do for this problem, but you should ask on GAE group. David
From: Paul McGuire on 2 Jul 2010 16:49 > Does anyone have any clue what that might be? > Why the problem is on GAE (even when run locally), when command line > run works just fine (even with recursion limit decreased)? Can't explain why you see different behavior on GAE vs. local, but it is unusual for a "small" translator to flirt with recursion limit. I don't usually see parsers come close to this with fewer than 40 or 50 sub-expressions. You may have some left-recursion going on. Can you post your translator somewhere, perhaps on pastebin, or on the pyparsing wiki Discussion page (pyparsing.wikispaces.com)? -- Paul
From: Soltys on 5 Jul 2010 05:31
On 2 Lip, 22:49, Paul McGuire <pt...(a)austin.rr.com> wrote: > > Does anyone have any clue what that might be? > > Why the problem is onGAE(even when run locally), when command line > > run works just fine (even withrecursionlimitdecreased)? > > Can't explain why you see different behavior onGAEvs. local, but it > is unusual for a "small" translator to flirt withrecursionlimit. I > don't usually see parsers come close to this with fewer than 40 or 50 > sub-expressions. You may have some left-recursiongoing on. Can you > post your translator somewhere, perhaps on pastebin, or on the > pyparsing wiki Discussion page (pyparsing.wikispaces.com)? > > -- Paul @David, thanks for the advice, I did ask on GAE list, id not get answer till now though. @Paul, I think I solved it. I did extensive test during weekend and it appears that my regular translator almost reaches 1000 recursion limit. Probably the last time I've tried to increase the recursion limit for GAE app I did it in the wrong place. (For future, if you'd like to do it, the best and working is to set that right before call to run_wsgi_app(application)). The only think that remains is, I need to review the grammar and how processing happens that I reach that limit with GAE. Thanks guys, Soltys |