AttributeError: Nonetype object does not have _info attribute

I am working on a Django project and this error occurs when I try to run any control commands, such as: python manage.py validate --settings ord.settings.development , python manage.py syncdb --settings ord.settings.development . The project uses Django 1.5 Error: AttributeError: 'Nonetype' object has no attribute '_info' . No other output is specified.

Base project settings file: https://gist.github.com/anonymous/5c0fede63b2724d7880b

Development Settings: https://gist.github.com/anonymous/f60b90dcf573b0a7b920

I replaced sensitive settings x

Any idea what could be wrong?

Some additional information, when I comment on LANGUAGE_CODE settings, some commands like validate , runserver , shell work fine, but syncdb and migrate work with an error: DatabaseError: current transaction is aborted, commands ignored until end of transaction block

Traceback: https://gist.github.com/anonymous/bc3364ae5ba511566871

+5
source share
3 answers

Had the same problem

Follow the instructions:

  • go to django/utils/translation/trans_real.py
  • search res = _translation(globalpath)
  • Add the following:

     if res is None: return gettext_module.NullTranslations() 

source: https://code.djangoproject.com/ticket/18192

+14
source

There was the same problem with a new installation on ubuntu 14.04. After long digging - I thought that I should share my finding: We use django 1.5 and have the same error. It looks like the django / conf / locale / en / LC_MESSAGES folder was missing in the django installation

The solution was to install the latest version of "pip install django == 1.5.12"

+6
source

I get this error with virtualenv setting.

I noticed that pip installed some parts of Django in the wrong place in my virtualenv - it was installed in the top level folder of virtualenv, and not in lib / python2.7 / site-packages /

In any case, I followed advice on this issue, which includes clearing the corrupted pip cache:

pip and virtualenv to install django parts in the wrong place

After that, Django was installed in the right place and the error disappeared.

+1
source

All Articles