On 29/07/13 14:36, Gary Martin wrote:
(CCing Johannes as I have a suspicion that he is not subscribed to the dev list.)

On 29/07/13 13:45, Johannes Spielmann wrote:
Hi,

I've just tried to install BloodHound in the 'de' locale and it wouldn't work with this error trace:
   Traceback (most recent call last):
     File "bloodhound_setup.py", line 485, in <module>
       bsetup.setup()
     File "bloodhound_setup.py", line 195, in setup
       translation.activate(locale)
File "/Users/spielmann/prog/bloodhound/bloodhound/trac/trac/util/translation.py", line 326, in activate
       translations.activate(locale, env_path)
File "/Users/spielmann/prog/bloodhound/bloodhound/trac/trac/util/translation.py", line 153, in activate
       t.add(Translations.load(locale_dir, locale or 'en_US',
   AttributeError: 'NullTranslations' object has no attribute 'add'

Changing the rather unusual test in line 149 of /trac/trac/util/translation.py to a regular isinstance test seems to fix the issue. A patch is attached.

Cheers,
Johannes


Thanks for that Johannes. Though this patch is effectively for trac, I suspect that a lot of our users will experience problems so I am very happy for you to have brought it up for us.

In fact, this problem also seems to have turned up on our demo servers which, up until recently, were building correctly. Seems like we probably need to look into why this should suddenly be the case.

Cheers,
    Gary

It looks to me as if this has partly come about due to the release of Babel 1.0+ and us not being careful enough to specify the exact version of babel for this release. It looks like an alternative 'fix' for users would be (in the activated virtualenv if appropriate):

   pip install Babel==0.9.6

Using this version specification should mean that any other version is uninstalled.

One of these solutions will have to be in the next release.

Many thanks again to Johannes!

Cheers,
    Gary

Reply via email to