GNOME Bugzilla – Bug 638149
Error if Ubuntu python-django-openid-auth installed
Last modified: 2011-01-04 06:41:34 UTC
Created attachment 177113 [details] snowy.wsgi I recently upgraded to Snowy 0.6.x (git pull to update to latest revision), and noticed an error when trying to add an OpenID account or login via OpenID. I don't recall if there was an error with 0.5, didn't really try OpenID. TypeError at /accounts/openid/login/ login_begin() got an unexpected keyword argument 'render_failure' I'm running Ubuntu 10.10 and had installed python-django-openid-auth. When I uninstalled that package and restarted Apache, the error went away. When I reinstalled the package and restarted Apache, the error reappeared. Checking the source for django_openid_auth, the version packaged with Ubuntu 10.10 does not have the argument render_failure, whereas the version packaged with Snowy does. Seems like it was loading the wrong django_openid_auth. I've attached my wsgi file so you can see my path settings. Maybe it's because the Snowy paths are being appended, so they come after system paths? I followed the instructions here to install initially: http://live.gnome.org/Snowy/Install/WSGI
Jeff: should our docs instead recommend inserting the path to snowy in the front of the python path? sys.path.insert(0, '/path/to/snowy') sys.path.insert(1, '/path/to') Like that? Blaise: if you use that instead of appending the path, with Ubuntu's python-django-openid-auth package installed, do you still get the error?
Actually, I still get the same error that way... unless I add a new path '/path/to/snowy/lib' using the insert method. So, I've found that this works (i.e. no error when Ubuntu's python-django-openid-auth is installed): sys.path.insert(0, '/path/to/snowy/lib') sys.path.insert(1, '/path/to/snowy') sys.path.insert(2, '/path/to') But without snowy/lib in the path, or if I try to add snowy/lib to the path using the append() method, I still get the error. Simply putting /path/to/snowy and /path/to at the start of the path didn't fix it.
Created attachment 177454 [details] [review] Fix the bundled library import order This patch negates the need to put this in your wsgi: sys.path.insert(0, '/path/to/snowy/lib') @Blaise The example snowy.wsgi file from http://live.gnome.org/Snowy/Install/WSGI, has also been updated with your suggestions about using sys.path.insert for: sys.path.insert(1, '/path/to/snowy') sys.path.insert(2, '/path/to')
Review of attachment 177454 [details] [review]: Right-o.