id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 9188 AttributeError: 'NoneType' object has no attribute 'tzinfo' Christian Boos Christian Boos "==== How to Reproduce ==== While doing a GET operation on `/prefs/datetime`, Trac issued an internal error. After installing pytz and restarting the server, changing one's timezone works but leads to the following traceback when visiting the preferences ''Date & Time'' panel (not only after the redirect, also afterwards). Request parameters: {{{ {'panel_id': u'datetime'} }}} User Agent was: `Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.8 Safari/533.2` ==== System Information ==== || '''`Trac`''' || `0.12dev-r9404` || || '''`Docutils`''' || `0.6` || || '''`Genshi`''' || `0.6dev-r1096` || || '''`psycopg2`''' || `2.0.8` || || '''`Pygments`''' || `1.2.2dev-20100224` || || '''`Python`''' || `2.5.2 (r252:60911, Oct 5 2008, 19:29:17) ` [[br]] `[GCC 4.3.2]` || || '''`pytz`''' || `2010g` || || '''`setuptools`''' || `0.6c9` || || '''`Subversion`''' || `1.5.1 (r32289)` || || '''`jQuery`''' || `1.4.2` || ==== Enabled Plugins ==== || '''`StatusFixer`''' || `r6326 ` || || '''`TracSpamFilter`''' || `0.2.1dev-r8929` || || '''`TracVote`''' || `0.1` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File ""build/bdist.linux-x86_64/egg/trac/web/main.py"", line 514, in _dispatch_request dispatcher.dispatch(req) File ""build/bdist.linux-x86_64/egg/trac/web/main.py"", line 257, in dispatch content_type) File ""build/bdist.linux-x86_64/egg/trac/web/chrome.py"", line 862, in render_template stream.render(method, doctype=doctype, out=buffer) File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 183, in render return encode(generator, method=method, encoding=encoding, out=out) File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 58, in encode for chunk in iterator: File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 339, in __call__ for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 826, in __call__ for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 670, in __call__ for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 771, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File ""build/bdist.linux-x86_64/egg/genshi/output.py"", line 586, in __call__ for ev in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/trac/web/chrome.py"", line 966, in _strip_accesskeys for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/trac/web/chrome.py"", line 955, in _generate for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 592, in _include for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 381, in _match ctxt, start=idx + 1, **vars): File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 381, in _match ctxt, start=idx + 1, **vars): File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 381, in _match ctxt, start=idx + 1, **vars): File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 381, in _match ctxt, start=idx + 1, **vars): File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 330, in _match for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 532, in _flatten for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/path.py"", line 588, in _generate subevent = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 592, in _include for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 330, in _match for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 319, in _strip event = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 532, in _flatten for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/path.py"", line 588, in _generate subevent = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 592, in _include for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 319, in _strip event = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 532, in _flatten for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/path.py"", line 588, in _generate subevent = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 592, in _include for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 319, in _strip event = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 532, in _flatten for kind, data, pos in stream: File ""build/bdist.linux-x86_64/egg/genshi/core.py"", line 288, in _ensure for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/path.py"", line 588, in _generate subevent = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 592, in _include for event in stream: File ""build/bdist.linux-x86_64/egg/genshi/template/markup.py"", line 319, in _strip event = next() File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 552, in _flatten result = _eval_expr(data, ctxt, vars) File ""build/bdist.linux-x86_64/egg/genshi/template/base.py"", line 277, in _eval_expr retval = expr.evaluate(ctxt) File ""build/bdist.linux-x86_64/egg/genshi/template/eval.py"", line 178, in evaluate return eval(self.code, _globals, {'__data__': data}) File ""/tmp/.lighttpd-egg-cache-trunk/Trac-0.12dev_r9404-py2.5.egg-tmp/trac/prefs/templates/prefs_datetime.html"", line 35, in In your time zone ${selected_tz.tzname(None)}, this would be displayed as File ""/usr/local/virtualenv/trunk/lib/python2.5/site-packages/pytz-2010g-py2.5.egg/pytz/tzinfo.py"", line 431, in tzname if dt.tzinfo is not self: AttributeError: 'NoneType' object has no attribute 'tzinfo' }}}" defect closed normal 0.11.8 general 0.12dev major fixed pytz, preferences