I am working on a Django
project and this error arises when I try to run any management 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
The error is: AttributeError: 'Nonetype' object has no attribute '_info'
. No other output is given.
The project base settings file is: https://gist.github.com/anonymous/5c0fede63b2724d7880b
The development settings: https://gist.github.com/anonymous/f60b90dcf573b0a7b920
I have replaced sensitive settings with x
Any idea what could be wrong?
Some extra info, when i comment out the LANGUAGE_CODE
settings, some commands like validate
, runserver
, shell
run fine but syncdb
and migrate
fail with error: DatabaseError: current transaction is aborted, commands ignored until end of transaction block
Traceback: https://gist.github.com/anonymous/bc3364ae5ba511566871
The Python "AttributeError: 'NoneType' object has no attribute 'items'" occurs when we try to call the items() method on a None value, e.g. assignment from function that doesn't return anything. To solve the error, make sure to only call items() on dict objects.
You are getting AttributeError: 'NoneType' object has no attribute 'something' because NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None. It means that an assignment or function call up above failed or returned an unexpected result.
The error “TypeError: 'NoneType' object is not iterable” occurs when you try to iterate over a NoneType object. Objects like list, tuple, and string are iterables, but not None. To solve this error, ensure you assign any values you want to iterate over to an iterable object.
The "AttributeError: 'NoneType' object has no attribute 'get'" occurs for multiple reasons: Having a function that doesn't return anything (returns None implicitly). Explicitly setting a variable to None . Assigning a variable to the result of calling a built-in function that doesn't return anything.
Had the same issue,
Please follow the steps:
django/utils/translation/trans_real.py
res = _translation(globalpath)
Add the following:
if res is None:
return gettext_module.NullTranslations()
source: https://code.djangoproject.com/ticket/18192
Had the same problem with a new installation on ubuntu 14.04. After lots of digging - thought I should share my finding: We are using django 1.5 and had the same error. It appears that the django installation was missing the folder django/conf/locale/en/LC_MESSAGES
Solution was to install latest version "pip install django==1.5.12"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With