views:

100

answers:

1

what does it mean? i ve googled but found nothing =/

ImportError at /admin/

cannot import name formats

Request Method:  GET
Request URL:  http://127.0.0.1:8000/admin/
Exception Type:  ImportError
Exception Value:  

cannot import name formats

Exception Location:  /usr/lib/python2.6/site-packages/django/contrib/admin/util.py in <module>, line 3
Python Executable:  /usr/bin/python
Python Version:  2.6.0
Python Path:  ['/home/cad/project/lkd/gezegen/lkd_gezegen', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/Numeric', '/usr/lib64/python2.6/site-packages/PIL', '/usr/lib64/python2.6/site-packages/gst-0.10', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode', '/usr/lib/python2.6/site-packages']
A: 

What that line is trying to do (see the sources) is

3   from django.utils import formats

If you don't have the parent directory of the django/ directory on your sys.path, or the __init__.py files at either levels somehow went missing, that would explain your issues.

On a side note, the .0 in 2.6.0 is worrisome -- it's an old microrelease with known bugs. Can you upgrade to the current 2.6.4? I don't think this is related to the problems you're observing but sticking with the old buggy microrelease might give you other problems in the future.

Alex Martelli