Opened 8 years ago

Closed 8 years ago

#288 closed defect (fixed)

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

Reported by: ckujau Owned by: moo
Priority: major Milestone: misc
Component: website Version:
Keywords: Cc:
Application: trac PHP Version:
Other Exts: SAPI: Irrelevant
Probability: Always Blocked By:


How to Reproduce

While doing a GET operation on /, Trac issued an internal error.

(please provide additional details here)

User Agent was: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0

System Information

Trac 0.11.7
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5]
setuptools 0.6
SQLite 3.7.3
pysqlite 2.4.1
Genshi 0.6
Pygments 1.3.1
Subversion 1.6.12 (r955767)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7-py2.6.egg/trac/web/", line 452, in _dispatch_request
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7-py2.6.egg/trac/web/", line 178, in dispatch
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7-py2.6.egg/trac/web/", line 298, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
  File "/usr/local/lib/python2.6/dist-packages/TracWikiNegotiator-1.6-py2.6.egg/wikinegotiator/", line 92, in pre_process_request
    page = self._decide_page(req)
  File "/usr/local/lib/python2.6/dist-packages/TracWikiNegotiator-1.6-py2.6.egg/wikinegotiator/", line 284, in _decide_page
    for lang in util.get_preferred_langs(req, self._default_lang):
  File "/usr/local/lib/python2.6/dist-packages/TracWikiNegotiator-1.6-py2.6.egg/wikinegotiator/", line 112, in get_preferred_langs
    langs = _parse_langs(req.get_header('accept-language').lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Change History (2)

comment:1 Changed 8 years ago by ckujau

  • Application set to trac
  • Component changed from cacher to website
  • Probability set to Always
  • Version 2.0.1 deleted

This really about this Trac instance, _not_ about Xcache. I could not access "" any more and the error message above is printed.

After digging around some more, I found the reason for this: I'm proxying through a Polipo Web-Proxy. When "censoredHeaders = accept-language" is set, the error message is printed and the frontpage of this Trac instance is not accessible any more. Disabling this option or accessing this page via https ( helps.

So, again: not an Xcache issue, but enough to get annoyed. I wouldn't mind seeing this ticket closed, as it's now documented for anyone else having the same problem.

comment:2 Changed 8 years ago by moo

  • Milestone changed from undecided to misc
  • Resolution set to fixed
  • Status changed from new to closed

thanks. this is fixed manually, will push to upstream later because upstream website is down for now. you may remind me when it's back:

Note: See TracTickets for help on using tickets.