help with Error was: No module named io

283 views
Skip to first unread message

CrabbyPete

unread,
Aug 28, 2011, 10:34:55 AM8/28/11
to Django developers
I am running django 1.3 on python version 2.5.2. My code runs fine on
python v2.6 but on v2.5.2 I get the following

Could not import base.views. Error was: No module named io

Here is the traceback:
Django Version: 1.3
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'base',
'social',
'south']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/
django/core/handlers/base.py" in get_response
101. request.path_info)
File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/
django/core/urlresolvers.py" in resolve
252. sub_match = pattern.resolve(new_path)
File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/
django/core/urlresolvers.py" in resolve
158. return ResolverMatch(self.callback, args, kwargs,
self.name)
File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/
django/core/urlresolvers.py" in _get_callback
167. raise ViewDoesNotExist("Could not import %s. Error
was: %s" % (mod_name, str(e)))

Exception Type: ViewDoesNotExist at /
Exception Value: Could not import base.views. Error was: No module
named io

Jeremy Dunck

unread,
Aug 28, 2011, 10:44:15 AM8/28/11
to django-d...@googlegroups.com
You've mailed the django-developers list which is for development *of
Django itself*. The proper mailing list about using Django is
django-users. Please send this message to django-users unless you're
proposing a change to Django.

http://groups.google.com/group/django-users

> --
> You received this message because you are subscribed to the Google Groups "Django developers" group.
> To post to this group, send email to django-d...@googlegroups.com.
> To unsubscribe from this group, send email to django-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
>
>

CrabbyPete

unread,
Aug 29, 2011, 9:41:35 AM8/29/11
to Django developers
I'm posting it here because my understanding is that django 1.3
supports python 2.5., however this code runs perfectly well on 2.6 but
not on 2.5 and I get this error
I have posted it on the django user group and I got this reply which I
believe is correct.

http://groups.google.com/group/django-users/browse_thread/thread/3f191ba3b0bcf99f

Is this a bug, or does django 1.3 not support python 2.5?

Thanks

David Stanek

unread,
Aug 29, 2011, 9:55:09 AM8/29/11
to django-d...@googlegroups.com
Looking at the traceback below it looks like your base.views module is importing io and not django. Can you check and see if that's the case? I'm running django on 2.5 and it doesn't appear broken.

Russell Keith-Magee

unread,
Aug 29, 2011, 7:27:59 PM8/29/11
to django-d...@googlegroups.com
On Mon, Aug 29, 2011 at 9:41 PM, CrabbyPete <pete....@gmail.com> wrote:
> I'm posting it here because my understanding is that django 1.3
> supports python 2.5., however this code runs perfectly well on 2.6 but
> not on 2.5 and I get this error
> I have posted it on the django user group and I got this reply which I
> believe is correct.
>
> http://groups.google.com/group/django-users/browse_thread/thread/3f191ba3b0bcf99f
>
> Is this a bug, or does django 1.3 not support python 2.5?

As you've been told - twice - on that very thread, the problem appears
to be in your own code. Django *does* support Python 2.5, and we have
the test suite to prove it:

http://ci.django-cms.org/job/Django/database=sqlite3,python=python2.5/

On the other hand, Django doesn't guarantee that *your* code runs
under Python 2.5. In this case, assuming your PYTHONPATH is set up
right, if you open up a normal python prompt and run:

>>> from base import views

You should see the same "ImportError: No module named io" error.
Remove or replace that import, and your code will run.

Yours,
Russ Magee %-)

Reply all
Reply to author
Forward
0 new messages