I had the same problem, you can check http://groups.google.pl/group/pylons-discuss/browse_thread/thread/2cc8f8a07721269b
The solution is to use Python 2.5 at least. AuthKit egg is aviable only for Python 2.5 Maciek On 12 Lis, 15:56, Thomas Johnson <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I am a new pylons user and am having a few issues with AuthKit. I > attempted to follow a few tutorials that covered the setup of AuthKit > but they seemed pretty dated. I ended up using epydoc to generate the > documentation for pylons and authkit. I have managed to get a basic > setup of AuthKit working but now I am trying to get UsersFromDatabase > authentication working. The tutorials that I have read so far are: > > http://pylonsbook.com/alpha1/authentication_and_authorizationhttp://wiki.pylonshq.com/display/pylonscookbook/AuthKit+0.4+UsersFrom... > > My controller is: > > import logging > import datetime > from myapp.lib.base import * > from pylons import tmpl_context as c > from pylons.templating import render_mako as render > log = logging.getLogger(__name__) > > from authkit.authorize.pylons_adaptors import authorize, authorized > from authkit.permissions import RemoteUser, ValidAuthKitUser > > class FooController(BaseController): > > @authorize(ValidAuthKitUser()) > def private(self): > response.status = "401 Not authenticated" > return "You are not authenticated" > > I see the following error when I attempt to view /foo/private(when not > logged in): > File '<string>', line 1 in <lambda> > File > '/usr/lib/python2.4/site-packages/AuthKit-0.4.2-py2.4.egg/authkit/authorize > /pylons_adaptors.py', > line 36 in validate > return permission.check(app, request.environ, self.start_response) > File > '/usr/lib/python2.4/site-packages/AuthKit-0.4.2-py2.4.egg/authkit/permissio > ns.py', > line 300 in check > raise NotAuthenticatedError('Not Authenticated') > TypeError: exceptions must be classes, instances, or strings > (deprecated), not NotAuthenticatedError > > I can't help but feel like I am missing extremely simple somewhere. > Any suggestions would be great. > > cheers, > Tom > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iD8DBQFJGu6Up0KneERU9LsRAvo4AJwLJsED3fC1ZT8DH5r4UefKAX1yFQCfXL/i > bk1O6XCMSs1FdS4TF5ACnBg= > =zs9P > -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
