Description
When starting MoinMoin 1.9.0 (using Apache and FastCGI), I get the following exception:
Traceback (most recent call last): File "/home/jbw/www/moinmoin/MoinMoin/wsgiapp.py", line 250, in __call__ context = init(request) File "/home/jbw/www/moinmoin/MoinMoin/wsgiapp.py", line 33, in init context.lang = setup_i18n_preauth(context) File "/home/jbw/www/moinmoin/MoinMoin/wsgiapp.py", line 224, in setup_i18n_preauth if lang is None and cfg.language_default in i18n.languages: TypeError: argument of type 'NoneType' is not iterable
This is the code that fails:
1 def setup_i18n_preauth(context):
2 """ Determine language for the request in absence of any user info. """
3 if i18n.languages is None:
4 i18n.i18n_init(context)
5
6 cfg = context.cfg
7 lang = None
8 if i18n.languages and not cfg.language_ignore_browser:
9 for l in context.request.accept_languages:
10 if l in i18n.languages:
11 lang = l
12 break
13 if lang is None and cfg.language_default in i18n.languages:
14 lang = cfg.language_default
15 else:
16 lang = 'en'
17 return lang
In line 13, i18n.languages is not defined.
No, it is defined, but it is None, that is not iterable.
Steps to reproduce
Well... install a fresh MoinMoin 1.9.0, try to get it working with Apache2, access the front page. I've attached all the config files that I'm using.
Details
MoinMoin Version |
1.9.0 |
OS and Version |
Debian Lenny |
Python Version |
2.5.4 |
Server Setup |
Apache2 with mod_fcgi |
Server Details |
2.2.14-3 |
Language you are using the wiki in (set in the browser/UserPreferences) |
English? |
Discussion
That browser language detection was broken also in other ways and was fixed already, please test.
Plan
- Priority:
- Assigned to:
Status: that should be already fixed by http://hg.moinmo.in/moin/1.9/rev/7c9372ef5428 - please test it with current repo code.
Confirmed status. Works like a charm now! Thanks!