AttributeError: 'NoneType' object has no attribute '_info'

627 views
Skip to first unread message

Iain Mac Donald

unread,
Nov 23, 2009, 2:40:34 PM11/23/09
to satchm...@googlegroups.com

I have two, what looks like, identical servers. I copied a project from
one to the other and tried to run it using the dev server and I get the
error shown in the subject. Thinking it might be something I introduced
I tried running the Satchmo example projects and they fail too.

satchmo_check shows no errors, the traceback happens when I try to load
a page.

Ideas anyone?

Regards,
Iain.


Satchmo 0.9, Django 1.1.1, Python 2.5

Traceback (most recent call last):

File
"/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 279, in run self.result = application(self.environ,
self.start_response)

File
"/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py",
line 651, in __call__ return self.application(environ, start_response)

File "/usr/lib/python2.5/site-packages/django/core/handlers/wsgi.py",
line 241, in __call__ response = self.get_response(request)

File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py",
line 73, in get_response response = middleware_method(request)

File "/usr/lib/python2.5/site-packages/django/middleware/locale.py",
line 17, in process_request translation.activate(language)

File
"/usr/lib/python2.5/site-packages/django/utils/translation/__init__.py",
line 73, in activate return real_activate(language)

File
"/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py",
line 205, in activate _active[currentThread()] = translation(language)

File
"/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py",
line 195, in translation current_translation = _fetch(language,
fallback=default_translation)

File
"/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py",
line 160, in _fetch res._info = res._info.copy()

AttributeError: 'NoneType' object has no attribute '_info'

Chris Moffitt

unread,
Nov 23, 2009, 8:38:51 PM11/23/09
to satchm...@googlegroups.com
Are you sure that the locales are set up the same between the two servers? There's something wrong with the attempt to translate something.

-Chris


--

You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=.



Iain Mac Donald

unread,
Nov 24, 2009, 5:33:01 AM11/24/09
to satchm...@googlegroups.com
On Mon, 23 Nov 2009 19:38:51 -0600
Chris Moffitt <ch...@moffitts.net> wrote:

Thanks for the reply Chris.

The really weird thing is it was working a few months back. I then
upgraded Django to 1.1.1, Satchmo to 0.9 and now it doesn't work. The
exact same set up on the other server does work.

> Are you sure that the locales are set up the same between the two
> servers?

They appear to be the same.

LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

I have tried setting LC_ALL but that makes no difference.

>>> import locale
>>> locale.getdefaultlocale()
>>> ('en_GB', 'UTF8')


ls -l .../django/conf/locale/en/LC_MESSAGES
total 96
-rw-r--r-- 1 root root 358 2008-09-03 06:42 djangojs.mo
-rw-r--r-- 1 root root 2693 2008-09-03 06:42 djangojs.po
-rw-r--r-- 1 root root 572 2008-09-03 06:42 django.mo
-rw-r--r-- 1 root root 81056 2008-09-03 06:42 django.po

I also tried a fresh Django project. If I set LANGUAGE_CODE =
'en-us' works on both servers. If I set LANGUAGE_CODE = 'en-gb' it works
on one server but not the other.

Django version 1.1.1, using settings 'testtest.settings'
Development server is running at http://0.0.0.0:8800/
Quit the server with CONTROL-C.
Unhandled exception in thread started by <function inner_run at
0xb78abc34> Traceback (most recent call last):
File
"/usr/lib/python2.5/site-packages/django/core/management/commands/runserver.py",
line 56, in inner_run translation.activate(settings.LANGUAGE_CODE) File
"/usr/lib/python2.5/site-packages/django/utils/translation/__init__.py",
line 73, in activate return real_activate(language) File
"/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py",
line 205, in activate _active[currentThread()] = translation(language)
File
"/usr/lib/python2.5/site-packages/django/utils/translation/trans_real.py",
line 194, in translation default_translation =
_fetch(settings.LANGUAGE_CODE) File
Reply all
Reply to author
Forward
0 new messages