-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Metin Akat wrote: > Hi folks, > I have a problem with the repoze.who.plugins.sa > I am not sure if it's some misconfiguration in my application or a bug > in the plugin itself. > It's my first time using repoze > > http://pylonshq.com/tracebacks/e814ec68cdb962a1193d4b9babdaf501 > > (I'll paste the traceback here as well) > URL: http://localhost:5000/login_handler?__logins=0&came_from=/ > File '/usr/lib64/python2.6/site-packages/weberror/evalexception.py', > line 431 in respond > app_iter = self.application(environ, detect_start_response) > File > '/home/loxs/lib/python2.6/repoze.who-1.0.15-py2.6.egg/repoze/who/middleware.py', > line 69 in __call__ > auth_ids = self.authenticate(environ, classification, ids) > File > '/home/loxs/lib/python2.6/repoze.who-1.0.15-py2.6.egg/repoze/who/middleware.py', > line 201 in authenticate > userid = plugin.authenticate(environ, identity) > File > '/home/loxs/lib/python2.6/repoze.who.plugins.sa-1.0rc2_r3742-py2.6.egg/repoze/who/plugins/sa.py', > line 114 in authenticate > user = self.get_user(identity['login']) > File > '/home/loxs/lib/python2.6/repoze.who.plugins.sa-1.0rc2_r3742-py2.6.egg/repoze/who/plugins/sa.py', > line 54 in get_user > query = self.dbsession.query(self.user_class) > AttributeError: 'NoneType' object has no attribute 'query' > > > My application has no problems in operating the users when I import > the User class.
You need to be passing a valid 'dbsession' object to the constructor of the plugin, rather than None. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKWS+K+gerLs4ltQ4RAkOLAJ9X8G89iXncZS9pMwkcei9J7SGkBQCgqBIh nmmCrOueqGDTWtYXISi4HNI= =KhCB -----END PGP SIGNATURE----- _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev