After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638149 - Error if Ubuntu python-django-openid-auth installed
Error if Ubuntu python-django-openid-auth installed
Status: RESOLVED FIXED
Product: snowy
Classification: Deprecated
Component: general
git master
Other Linux
: Normal normal
: future
Assigned To: snowy-maint
snowy-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-28 01:21 UTC by Blaise Alleyne
Modified: 2011-01-04 06:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
snowy.wsgi (272 bytes, text/plain)
2010-12-28 01:21 UTC, Blaise Alleyne
  Details
Fix the bundled library import order (704 bytes, patch)
2011-01-04 05:37 UTC, Jeff Schroeder
committed Details | Review

Description Blaise Alleyne 2010-12-28 01:21:05 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
Comment 1 Sandy Armstrong 2010-12-28 02:54:19 UTC
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?
Comment 2 Blaise Alleyne 2010-12-28 05:41:18 UTC
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.
Comment 3 Jeff Schroeder 2011-01-04 05:37:27 UTC
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')
Comment 4 Sandy Armstrong 2011-01-04 06:26:30 UTC
Review of attachment 177454 [details] [review]:

Right-o.