Closed Bug 943118 Opened 11 years ago Closed 9 years ago

[traceback] AttributeError: DjangoTranslation instance has no attribute '_DjangoTranslation__language'

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mythmon, Unassigned)

Details

(Whiteboard: p= u= c= s=)

I keep seeing this in my email. Not sure what's up, or if this is already filed, or if there is anything we can do.


Traceback (most recent call last):

  File "/data/www/support.mozilla.org/kitsune/vendor/src/raven-python/raven/utils/serializer/manager.py", line 73, in transform
    return self.transform(repr(value), **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/utils/translation/trans_real.py", line 93, in __repr__
    return "<DjangoTranslation lang:%s>" % self.__language

AttributeError: DjangoTranslation instance has no attribute '_DjangoTranslation__language'


Request repr() unavailable.
I sent an email about this a few weeks ago.

Three thoughts:

1. we get them in batches of 4 to 30 or so

2. I think I get them every time someone kicks the server because of this production problem we have (bug #934601)

3. I'm hoping it's just raven having problems serializing these instances because something happened, but that raven still reports the something to sentry. I suspect that raven is hitting these and then never reports the thing that happened to sentry.

I've tossed around upgrading raven. I did some looking around at the changes between what we have and what's current and I didn't see anything obvious that would fix this.

Ricky looked into it at one point and determined that we have no idea how a DjangoTranslation can exist without that property--it gets set in __init__ at the end:

    def __init__(self, *args, **kw):
        gettext_module.GNUTranslations.__init__(self, *args, **kw)
        self.set_output_charset('utf-8')
        self.django_output_charset = 'utf-8'
        self.__language = '??'

Maybe it's dying before it gets there? That's pretty crazy if so.

I'm secretly hoping these go away when we upgrade to Django 1.5.

That's everything I know about it.
I haven't seen one of these in ages. Does that suggest the problem might be gone?
I also haven't seen one of these in ages. I bet it was related to Django 1.4, or the great threading issue of 2013. Or the phase of the sun in relation to the galactic center. Either way, I think we can close this out now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.