On Tue, Sep 22, 2009 at 1:56 PM, Parag Shah <adapti...@gmail.com> wrote: > Hi, > > I am using django-openid-consumer, which has a line in it's views.py > which results in an error due to module not found - > > from openid.extensions.pape import Request as PapeRequest > > where 'openid.extensions' comes from python-openid-2.2.4 (installed > using 'python setup.py install'), which has an 'extensions' directory, > but no 'pape' directory. However, 'extensions' has an __init__.py > which seems to be importing 'pape', like this: > > __all__ = ['ax', 'pape', 'sreg'] > from openid.extensions.draft import pape5 as pape > > > However, the Django app still gives me an error when the line which > required pape is executed. I started the Python prompt and tried the > following: > >>>> from openid.extensions import pape >>>> from openid.extensions.pape import PageRequest > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > ImportError: No module named pape
The __init__.py creates the name openid.extensions.pape by importing from the draft. So there is no openid.extensions.pape module in the import path. I would try from openid.extensions import pape PageRequest = pape.PageRequest Kent _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor