From neel at mediapulse.com Thu Sep 9 07:46:27 2004 From: neel at mediapulse.com (Michael C. Neel) Date: Wed, 08 Sep 2004 17:46:27 -0400 Subject: [albatross-users] SnakeSkin Message-ID: <1094679986.29095.41.camel@mike.mediapulse.com> Well, getting to a point where I could release took longer than I had thought, but SnakeSkin has been approved for release under the BSD license, and we have a project setup on SourceForge at http://snakeskin-tools.sourceforge.net/ Anyone on this list I'd like to ask that you take a look at the http://snakeskin-tools.sourceforge.net/about/contributers.html page and tell me if anyone else needs to be on that list; it's important to me it's correct. There isn't any documentation up yet for SnakeSkin, it's my next goal (though it's more fun to play in source code, docs are kinda important). We have a version we would like to stamp 1.0, so to help anyone from the Albatross crowd see what we've done so far, I put together a list of changes at http://snakeskin-tools.sourceforge.net/reference/albatross.html Any and all comments and suggestions are welcome. Because we are on sf.net, we have a bug system, cvs, patch tracker, etc. We also have setup a mailing list ( http://lists.sourceforge.net/lists/listinfo/snakeskin-tools-discuss ), and I ask that we keep the snakeskin stuff off of the albatross lists... knowing full well the irony of that statment in this post. ;) Thanks, Mike From tchur at optushome.com.au Thu Sep 9 09:56:11 2004 From: tchur at optushome.com.au (Tim Churches) Date: Thu, 09 Sep 2004 09:56:11 +1000 Subject: [albatross-users] SnakeSkin Message-ID: <200409082356.i88NuBcj031586@mail07.syd.optusnet.com.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: From neel at mediapulse.com Fri Sep 10 04:30:43 2004 From: neel at mediapulse.com (Michael C. Neel) Date: Thu, 09 Sep 2004 14:30:43 -0400 Subject: [albatross-users] SnakeSkin In-Reply-To: <200409082356.i88NuBcj031586@mail07.syd.optusnet.com.au> References: <200409082356.i88NuBcj031586@mail07.syd.optusnet.com.au> Message-ID: <1094754642.12825.12.camel@mike.mediapulse.com> On Wed, 2004-09-08 at 19:56, Tim Churches wrote: > This is an excellent development, as it provides evidence of support for Albatross > and cousins across more than one continent. > > "a framework that scales..." - very good. Looking forward to more herpetological > puns. > I'll try not to disappoint! > A few typos: "tooklit", "Contributers" > Thanks for the catches, a sign of how much I've been working on the site to miss those, at least the were spelled correctly in CVS ;) Mike From sheila at thinkspot.net Thu Sep 30 04:12:36 2004 From: sheila at thinkspot.net (Sheila King) Date: Wed, 29 Sep 2004 11:12:36 -0700 Subject: [albatross-users] Help catching an exception... Message-ID: Hello, I'm using Albatross to develop an account management interface for the web hosting company that I work for. In the testing process, I have determined that certain type of request urls will cause Albatross to throw an exception, and I'm trying to catch that exception to redirect to a public error page of my choosing so that end users do not see the Python tracebacks. Mind you, it would be some odd circumstance that would even lead to this type of error, but I am hoping to cover as many error situations as I can. The problem is this: A correct URL for the application might look like this: http://example.net/cgi-dev/mgr.py/createlogin But suppose this URL is requested instead: http://example.net/cgi-dev/mgr.py/mgr.py/createlogin Then albatross gives the following traceback: ----- Template traceback (most recent call last): Traceback (most recent call last): File "albatross/app.py", line 279, in run self.load_page(ctx) File "albatross/randompage.py", line 29, in load_page self.load_page_module(ctx, page) File "albatross/app.py", line 435, in load_page_module raise ApplicationError('%s (in %s)' % (e, mod_dir)) ApplicationError: No module named createlogin (in ./pages/mgr/py) ----- In the __main__ function of the mgr.py file I tried adding a try/except to wrap the whole invocation of an albatross app (I know...bad programming...but...well...) Here is the except block I put on: except ApplicationError, e: Request = "http://www.Example.net/cgi-bin/mgr.py/errorpage" app = qaApp() ctx = qaAppContext(app) ctx.locals._errmssg = e app.run(qaRequest(Request)) Unfortunately, it appears to be having no effect, and I am still getting the identical traceback as before. I also tried changing the "except" statement to except albatross.ApplicationError, e and also tried adding an import statement at the top of the code from albatross.common import AlbatrossError and changing the except statement to: except AlbatrossError, e But again, no change in the traceback produced for that particular URL. I sure would appreciate any tips on how to catch this error and redirect to an error page of my choosing... Thank you, From neal at yorku.ca Thu Sep 30 04:56:20 2004 From: neal at yorku.ca (Neal Stephenson) Date: Wed, 29 Sep 2004 14:56:20 -0400 Subject: [albatross-users] Help catching an exception... In-Reply-To: References: Message-ID: <1096484180.15746.52.camel@aslan> HI, Not sure if this is right, but I override handle_exception in a subclass of the Application that I use for all my apps. Neal On Wed, 2004-09-29 at 14:12, Sheila King wrote: > Hello, > > I'm using Albatross to develop an account management interface for the web > hosting company that I work for. > > In the testing process, I have determined that certain type of request urls > will cause Albatross to throw an exception, and I'm trying to catch that > exception to redirect to a public error page of my choosing so that end > users do not see the Python tracebacks. > > Mind you, it would be some odd circumstance that would even lead to this > type of error, but I am hoping to cover as many error situations as I can. > > The problem is this: > > A correct URL for the application might look like this: > > http://example.net/cgi-dev/mgr.py/createlogin > > But suppose this URL is requested instead: > http://example.net/cgi-dev/mgr.py/mgr.py/createlogin > > Then albatross gives the following traceback: > ----- > Template traceback (most recent call last): > > Traceback (most recent call last): > File "albatross/app.py", line 279, in run > self.load_page(ctx) > File "albatross/randompage.py", line 29, in load_page > self.load_page_module(ctx, page) > File "albatross/app.py", line 435, in load_page_module > raise ApplicationError('%s (in %s)' % (e, mod_dir)) > ApplicationError: No module named createlogin (in ./pages/mgr/py) > ----- > > > In the __main__ function of the mgr.py file I tried adding > a try/except to wrap the whole invocation of an albatross app > (I know...bad programming...but...well...) > > Here is the except block I put on: > > except ApplicationError, e: > Request = "http://www.Example.net/cgi-bin/mgr.py/errorpage" > app = qaApp() > ctx = qaAppContext(app) > ctx.locals._errmssg = e > app.run(qaRequest(Request)) > > Unfortunately, it appears to be having no effect, and I am still > getting the identical traceback as before. > > I also tried changing the "except" statement to > > except albatross.ApplicationError, e > > and also tried adding an import statement at the top of the code > > from albatross.common import AlbatrossError > > and changing the except statement to: > > except AlbatrossError, e > > But again, no change in the traceback produced for that particular URL. > > > I sure would appreciate any tips on how to catch this error and > redirect to an error page of my choosing... > > Thank you, > > > _______________________________________________ > Albatross-users mailing list > Albatross-users at object-craft.com.au > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users -- Neal Stephenson Phone: (416) 736-2100 x40211 Manager, Development Services Fax: (416) 736-5830 Communication and Network Services Steacie T103, 4700 Keele St. York University Toronto, On., Canada M3J 1P3 From tchur at optushome.com.au Thu Sep 30 08:20:51 2004 From: tchur at optushome.com.au (Tim Churches) Date: 30 Sep 2004 08:20:51 +1000 Subject: [albatross-users] Help catching an exception... In-Reply-To: <1096484180.15746.52.camel@aslan> References: <1096484180.15746.52.camel@aslan> Message-ID: <1096496451.12884.54.camel@emilio> On Thu, 2004-09-30 at 04:56, Neal Stephenson wrote: > HI, > > Not sure if this is right, but I override handle_exception in a > subclass of the Application that I use for all my apps. > > Neal BTW, you're not THAT Neal Stephenson, are you? As I recall, Cryptonomicon contained some perl code, so it seems unlikely, but I had to ask. -- Tim C PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere or at http://members.optushome.com.au/tchur/pubkey.asc Key fingerprint = 8C22 BF76 33BA B3B5 1D5B EB37 7891 46A9 EAF9 93D0 From andrewm at object-craft.com.au Thu Sep 30 10:59:19 2004 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Thu, 30 Sep 2004 10:59:19 +1000 Subject: [albatross-users] Help catching an exception... In-Reply-To: References: Message-ID: <20040930005919.C2B823C249@coffee.object-craft.com.au> >In the testing process, I have determined that certain type of request urls >will cause Albatross to throw an exception, and I'm trying to catch that >exception to redirect to a public error page of my choosing so that end >users do not see the Python tracebacks. There are several ways to do this. As Neal suggested, you can subclass the Application class you have chosen, and override the handle_exception method, or you can add a template page called "traceback.html", which will be passed the python and albatross template tracebacks (with special characters suitably escaped) in python_exc and html_exc respectively. I would also recommend looking at the Albatross code - specifically the Application class in app.py. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From tchur at optushome.com.au Thu Sep 30 11:50:09 2004 From: tchur at optushome.com.au (Tim Churches) Date: Thu, 30 Sep 2004 11:50:09 +1000 Subject: [albatross-users] Help catching an exception... Message-ID: <200409300150.i8U1o9DS013071@mail28.syd.optusnet.com.au> An embedded and charset-unspecified text was scrubbed... Name: not available URL: