Description
Following upgrade from 1.6.3 to 1.7.1 and again from 1.7.1 to 1.7.2 and after running
moin --config-dir=... --wiki-url=... maint cleancache
we encounter the following exception with every page access
2008-09-13 14:37:08,908 MoinMoin.failure ERROR An exception occured. Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MoinMoin/request/request_cgi.py", line29, in __init__ RequestBase.__init__(self, properties) File "/usr/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 207, in __init__ lang = i18n.requestLanguage(self, try_user=False) File "/usr/lib/python2.4/site-packages/MoinMoin/i18n/__init__.py", line 334, in requestLanguage if request.cfg.language_default in available: TypeError: iterable argument required
Steps to reproduce
run moin --config-dir=... --wiki-url=... maint cleancache
- visit any wiki page
Example
Component selection
This occurs in MoinMoin/i18n/__init__.py
Details
2008-09-13 14:37:08,908 MoinMoin.failure ERROR An exception occured. Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MoinMoin/request/request_cgi.py", line29, in __init__ RequestBase.__init__(self, properties) File "/usr/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 207, in __init__ lang = i18n.requestLanguage(self, try_user=False) File "/usr/lib/python2.4/site-packages/MoinMoin/i18n/__init__.py", line 334, in requestLanguage if request.cfg.language_default in available: TypeError: iterable argument required
MoinMoin Version |
1.7.2 |
OS and Version |
CentOS 5.0 |
Python Version |
2.4 |
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
en, en-us, en-gb |
Browser |
Firefox 3.0.1 |
HTTP_ACCEPT_LANGUAGE: |
en,en-US;q=0.7,en-GB;q=0.3 |
Workaround
The following patch fixes it
--- .software/moin-1.7.2/build/lib/MoinMoin/i18n/__init__.py 2008-08-31 14:01:37.000000000 -0700 +++ /usr/local/lib/python2.4/site-packages/MoinMoin/i18n/__init__.py 2008-09-14 21:46:34.000000000 -0700 @@ -329,7 +329,7 @@ # is available on this wiki... lang = get_browser_language(request) if not lang: - available = wikiLanguages() + available = wikiLanguages() or ['en'] # Or return the wiki default language... if request.cfg.language_default in available: lang = request.cfg.language_default
Once the patch is applied and any page is visited and cache is updated, the patch can be removed, and the error does not occur until 'maint cleancache' is run again
Discussion
I also ran into this problem. I put my old cache folder back in data to fix it.
Plan
- Priority:
- Assigned to:
Status: duplication of MoinMoinBugs/WikiLanguageNotDefined http://hg.moinmo.in/moin/1.7/rev/615b785f9a3f