[Tutor] module not found problem

Parag Shah adaptives at gmail.com
Tue Sep 22 19:56:29 CEST 2009


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


So Python is able to execute the first import which just imports
'pape', but fails on the second import which imports 'PageRequest'
from 'pape'.

Can someone point out what the problem may be.

-- 
Thanks & Regards
Parag Shah
http://blog.adaptivesoftware.biz


More information about the Tutor mailing list