#3094: trac "Admin" page doesn't work ------------------------------+--------------------------------------------- Reporter: marcusoverhagen | Owner: haiku-web Type: bug | Status: closed Priority: normal | Milestone: R1 Component: Website/Trac | Version: R1 development Resolution: fixed | Blockedby: Platform: All | Blocking: ------------------------------+--------------------------------------------- Changes (by nielx): * status: new => closed * resolution: => fixed Old description: > Oops… > Trac detected an internal error: > > TemplateNotFound: Template "admin.html" not found > > If you think this should work you can reproduce the problem, you should > consider reporting this to the Trac team. > > Before you do that, though, please first try searching for similar > issues, as it is quite likely that this problem has been reported before. > For questions about installation and configuration of Trac, please try > the mailing list instead of filing a ticket. > > Otherwise, please ==== How to Reproduce ==== While doing a GET operation > on `/admin`, Trac issued an internal error. ''(please provide additional > details here)'' Request parameters: {{{ {'cat_id': None, 'panel_id': > None, 'path_info': None} }}} User Agent was: `Mozilla/5.0 (Windows; U; > Windows NT 5.0; de; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3` ==== > System Information ==== || '''Trac''' || `0.11.1` || || '''Python''' || > `2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C]` || || '''setuptools''' || > `0.6c8` || || '''psycopg2''' || `2.0.6` || || '''Genshi''' || `0.5` || || > '''Pygments''' || `0.10` || || '''Subversion''' || `1.4.5 (r25188)` || || > '''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback > (most recent call last): File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in > _dispatch_request dispatcher.dispatch(req) File "/opt/csw/lib/python > /site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in > dispatch data, content_type) File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in > render_template template = self.load_template(filename, method=method) > File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in > load_template return self.templates.load(filename, cls=cls) File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 221, > in load filename, encoding=encoding) File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, > in _instantiate allow_exec=self.allow_exec) File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 377, > in __init__ self.stream = list(self._prepare(self._parse(source, > encoding))) File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 444, > in _prepare cls=cls or self.__class__) File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, > in load raise TemplateNotFound(filename, search_path) TemplateNotFound: > Template "admin.html" not found }}} a new ticket at the Trac project > site, where you can describe the problem and explain how to reproduce it. > Python Traceback > Most recent call last: > > * File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in > _dispatch_request > Code fragment: > 418. try: > 419. if not env and env_error: > 420. raise HTTPInternalError(env_error) > 421. try: > 422. dispatcher = RequestDispatcher(env) > 423. dispatcher.dispatch(req) > 424. except RequestDone: > 425. pass > 426. resp = req._response or [] > 427. > 428. except HTTPException, e: > Local variables: > Name Value > after [u' except RequestDone:', u' pass', u' resp = ... > before [u' try:', u' if not env and env_error:', u' raise ... > dispatcher <trac.web.main.RequestDispatcher object at > 0x9aa86cc> > e TemplateNotFound(u'Template "admin.html" not found',) > env <trac.env.Environment object at 0x96296ec> > env_error None > exc_info (<class 'genshi.template.loader.TemplateNotFound'>, ... > filename '/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py' > frames [{'function': '_dispatch_request', 'lines_before': [u' > try:', u' ... > has_admin True > line u' dispatcher.dispatch(req)' > lineno 422 > message u'TemplateNotFound: Template "admin.html" not found' > req <Request "GET u'/admin'"> > resp [] > tb <traceback object at 0xd2068ec> > tb_hide None > traceback 'Traceback (most recent call last):\n File ... > * File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch > Code fragment: > 214. out = StringIO() > 215. pprint(data, out) > 216. req.send(out.getvalue(), 'text/plain') > 217. else: > 218. output = chrome.render_template(req, template, > 219. data, content_type) > 220. # Give the session a chance to persist changes > 221. if req.session: > 222. req.session.save() > 223. > 224. req.send(output, content_type or 'text/html') > Local variables: > Name Value > chosen_handler <trac.admin.web_ui.AdminModule object at > 0x9aa87ec> > chrome <trac.web.chrome.Chrome object at 0x9a9afec> > content_type None > data {'dateinfo': <function dateinfo at 0xabdadbc>, > 'active_panel': 'basics', ... > err (<class 'genshi.template.loader.TemplateNotFound'>, ... > handler <trac.admin.web_ui.AdminModule object at 0x9aa87ec> > req <Request "GET u'/admin'"> > resp ('admin_basics.html', {'dateinfo': <function dateinfo at > 0xabdadbc>, ... > self <trac.web.main.RequestDispatcher object at 0x9aa86cc> > template 'admin_basics.html' > * File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in > render_template > Code fragment: > 678. if content_type is None: > 679. content_type = 'text/html' > 680. method = {'text/html': 'xhtml', > 681. 'text/plain': 'text'}.get(content_type, 'xml') > 682. > 683. template = self.load_template(filename, method=method) > 684. data = self.populate_data(req, data) > 685. > 686. stream = template.generate(**data) > 687. > 688. # Filter through ITemplateStreamFilter plugins > Local variables: > Name Value > content_type 'text/html' > data {'dateinfo': <function dateinfo at 0xabdadbc>, > 'active_panel': 'basics', ... > filename 'admin_basics.html' > fragment False > method 'xhtml' > req <Request "GET u'/admin'"> > self <trac.web.chrome.Chrome object at 0x9a9afec> > * File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in > load_template > Code fragment: > 662. if method == 'text': > 663. cls = TextTemplate > 664. else: > 665. cls = MarkupTemplate > 666. > 667. return self.templates.load(filename, cls=cls) > 668. > 669. def render_template(self, req, filename, data, > content_type=None, > 670. fragment=False): > 671. """Render the `filename` using the `data` for the context. > 672. > Local variables: > Name Value > cls <class 'genshi.template.markup.MarkupTemplate'> > filename 'admin_basics.html' > method 'xhtml' > self <trac.web.chrome.Chrome object at 0x9a9afec> > * File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 221, > in load > Local variables: > Name Value > cachekey 'admin_basics.html' > cls <class 'genshi.template.markup.MarkupTemplate'> > encoding None > filename 'admin_basics.html' > fileobj <closed file ... > filepath '/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... > isabs False > loadfunc <function _load_from_directory at 0xabda9cc> > relative_to None > search_path ['/var/trac/dev.haiku-os.org/templates', ... > self <genshi.template.loader.TemplateLoader object at > 0x989b46c> > uptodate <function _uptodate at 0xabda6f4> > * File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, > in _instantiate > Local variables: > Name Value > cls <class 'genshi.template.markup.MarkupTemplate'> > encoding None > filename 'admin_basics.html' > fileobj <closed file ... > filepath '/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... > self <genshi.template.loader.TemplateLoader object at > 0x989b46c> > * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", > line 377, in __init__ > Local variables: > Name Value > allow_exec True > encoding None > filename 'admin_basics.html' > filepath '/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... > loader <genshi.template.loader.TemplateLoader object at > 0x989b46c> > lookup 'lenient' > self <MarkupTemplate "admin_basics.html"> > source <closed file ... > * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", > line 444, in _prepare > Local variables: > Name Value > TemplateNotFound <class 'genshi.template.loader.TemplateNotFound'> > cls <class 'genshi.template.markup.MarkupTemplate'> > data (u'admin.html', <class > 'genshi.template.markup.MarkupTemplate'>, None) > fallback None > href u'admin.html' > kind 'INCLUDE' > pos ('admin_basics.html', 7, 34) > self <MarkupTemplate "admin_basics.html"> > stream [('DOCTYPE', (u'html', u'-//W3C//DTD XHTML 1.0 > Strict//EN', ... > * File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, > in load > Local variables: > Name Value > cachekey u'admin.html' > cls <class 'genshi.template.markup.MarkupTemplate'> > encoding None > filename u'admin.html' > isabs False > loadfunc <function _load_from_directory at 0xabdaaac> > relative_to 'admin_basics.html' > search_path ['/var/trac/dev.haiku-os.org/templates', ... > self <genshi.template.loader.TemplateLoader object at > 0x989b46c> > > File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in > _dispatch_request > dispatcher.dispatch(req) > File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch > data, content_type) > File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in > render_template > template = self.load_template(filename, method=method) > File "/opt/csw/lib/python/site- > packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in > load_template > return self.templates.load(filename, cls=cls) > File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line > 221, in loadFile > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, > in _instantiateFile > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 377, > in __init__File > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 444, > in _prepareFile > "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, > in load > > System Information: > > User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9.0.3) > Gecko/2008092417 Firefox/3.0.3 > Trac: 0.11.1 > Python: 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] > setuptools: 0.6c8 > psycopg2: 2.0.6 > Genshi: 0.5 > Pygments: 0.10 > Subversion: 1.4.5 (r25188) > jQuery: 1.2.6 > > TracGuide — The Trac User and Administration Guide New description: Oops… Trac detected an internal error: TemplateNotFound: Template "admin.html" not found If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team. Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket. Otherwise, please ==== How to Reproduce ==== While doing a GET operation on `/admin`, Trac issued an internal error. ''(please provide additional details here)'' Request parameters: {{{ {'cat_id': None, 'panel_id': None, 'path_info': None} }}} User Agent was: `Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3` ==== System Information ==== || '''Trac''' || `0.11.1` || || '''Python''' || `2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C]` || || '''setuptools''' || `0.6c8` || || '''psycopg2''' || `2.0.6` || || '''Genshi''' || `0.5` || || '''Pygments''' || `0.10` || || '''Subversion''' || `1.4.5 (r25188)` || || '''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback (most recent call last): File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch data, content_type) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in render_template template = self.load_template(filename, method=method) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in load_template return self.templates.load(filename, cls=cls) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 221, in load filename, encoding=encoding) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, in _instantiate allow_exec=self.allow_exec) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 377, in __init__ self.stream = list(self._prepare(self._parse(source, encoding))) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 444, in _prepare cls=cls or self.__class__) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, in load raise TemplateNotFound(filename, search_path) TemplateNotFound: Template "admin.html" not found }}} a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it. Python Traceback Most recent call last: * File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request Code fragment: 418. try: 419. if not env and env_error: 420. raise HTTPInternalError(env_error) 421. try: 422. dispatcher = RequestDispatcher(env) 423. dispatcher.dispatch(req) 424. except RequestDone: 425. pass 426. resp = req._response or [] 427. 428. except HTTPException, e: Local variables: Name Value after [u' except RequestDone:', u' pass', u' resp = ... before [u' try:', u' if not env and env_error:', u' raise ... dispatcher <trac.web.main.RequestDispatcher object at 0x9aa86cc> e TemplateNotFound(u'Template "admin.html" not found',) env <trac.env.Environment object at 0x96296ec> env_error None exc_info (<class 'genshi.template.loader.TemplateNotFound'>, ... filename '/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py' frames [{'function': '_dispatch_request', 'lines_before': [u' try:', u' ... has_admin True line u' dispatcher.dispatch(req)' lineno 422 message u'TemplateNotFound: Template "admin.html" not found' req <Request "GET u'/admin'"> resp [] tb <traceback object at 0xd2068ec> tb_hide None traceback 'Traceback (most recent call last):\n File ... * File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch Code fragment: 214. out = StringIO() 215. pprint(data, out) 216. req.send(out.getvalue(), 'text/plain') 217. else: 218. output = chrome.render_template(req, template, 219. data, content_type) 220. # Give the session a chance to persist changes 221. if req.session: 222. req.session.save() 223. 224. req.send(output, content_type or 'text/html') Local variables: Name Value chosen_handler <trac.admin.web_ui.AdminModule object at 0x9aa87ec> chrome <trac.web.chrome.Chrome object at 0x9a9afec> content_type None data {'dateinfo': <function dateinfo at 0xabdadbc>, 'active_panel': 'basics', ... err (<class 'genshi.template.loader.TemplateNotFound'>, ... handler <trac.admin.web_ui.AdminModule object at 0x9aa87ec> req <Request "GET u'/admin'"> resp ('admin_basics.html', {'dateinfo': <function dateinfo at 0xabdadbc>, ... self <trac.web.main.RequestDispatcher object at 0x9aa86cc> template 'admin_basics.html' * File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in render_template Code fragment: 678. if content_type is None: 679. content_type = 'text/html' 680. method = {'text/html': 'xhtml', 681. 'text/plain': 'text'}.get(content_type, 'xml') 682. 683. template = self.load_template(filename, method=method) 684. data = self.populate_data(req, data) 685. 686. stream = template.generate(**data) 687. 688. # Filter through ITemplateStreamFilter plugins Local variables: Name Value content_type 'text/html' data {'dateinfo': <function dateinfo at 0xabdadbc>, 'active_panel': 'basics', ... filename 'admin_basics.html' fragment False method 'xhtml' req <Request "GET u'/admin'"> self <trac.web.chrome.Chrome object at 0x9a9afec> * File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in load_template Code fragment: 662. if method == 'text': 663. cls = TextTemplate 664. else: 665. cls = MarkupTemplate 666. 667. return self.templates.load(filename, cls=cls) 668. 669. def render_template(self, req, filename, data, content_type=None, 670. fragment=False): 671. """Render the `filename` using the `data` for the context. 672. Local variables: Name Value cls <class 'genshi.template.markup.MarkupTemplate'> filename 'admin_basics.html' method 'xhtml' self <trac.web.chrome.Chrome object at 0x9a9afec> * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 221, in load Local variables: Name Value cachekey 'admin_basics.html' cls <class 'genshi.template.markup.MarkupTemplate'> encoding None filename 'admin_basics.html' fileobj <closed file ... filepath '/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... isabs False loadfunc <function _load_from_directory at 0xabda9cc> relative_to None search_path ['/var/trac/dev.haiku-os.org/templates', ... self <genshi.template.loader.TemplateLoader object at 0x989b46c> uptodate <function _uptodate at 0xabda6f4> * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, in _instantiate Local variables: Name Value cls <class 'genshi.template.markup.MarkupTemplate'> encoding None filename 'admin_basics.html' fileobj <closed file ... filepath '/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... self <genshi.template.loader.TemplateLoader object at 0x989b46c> * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 377, in __init__ Local variables: Name Value allow_exec True encoding None filename 'admin_basics.html' filepath '/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/admin/templat ... loader <genshi.template.loader.TemplateLoader object at 0x989b46c> lookup 'lenient' self <MarkupTemplate "admin_basics.html"> source <closed file ... * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 444, in _prepare Local variables: Name Value TemplateNotFound <class 'genshi.template.loader.TemplateNotFound'> cls <class 'genshi.template.markup.MarkupTemplate'> data (u'admin.html', <class 'genshi.template.markup.MarkupTemplate'>, None) fallback None href u'admin.html' kind 'INCLUDE' pos ('admin_basics.html', 7, 34) self <MarkupTemplate "admin_basics.html"> stream [('DOCTYPE', (u'html', u'-//W3C//DTD XHTML 1.0 Strict//EN', ... * File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, in load Local variables: Name Value cachekey u'admin.html' cls <class 'genshi.template.markup.MarkupTemplate'> encoding None filename u'admin.html' isabs False loadfunc <function _load_from_directory at 0xabdaaac> relative_to 'admin_basics.html' search_path ['/var/trac/dev.haiku-os.org/templates', ... self <genshi.template.loader.TemplateLoader object at 0x989b46c> File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request dispatcher.dispatch(req) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 219, in dispatch data, content_type) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 683, in render_template template = self.load_template(filename, method=method) File "/opt/csw/lib/python/site- packages/Trac-0.11.1-py2.5.egg/trac/web/chrome.py", line 667, in load_template return self.templates.load(filename, cls=cls) File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 221, in loadFile "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 259, in _instantiateFile "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 377, in __init__File "build/bdist.solaris-2.10-i86pc/egg/genshi/template/base.py", line 444, in _prepareFile "build/bdist.solaris-2.10-i86pc/egg/genshi/template/loader.py", line 231, in load System Information: User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 Trac: 0.11.1 Python: 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] setuptools: 0.6c8 psycopg2: 2.0.6 Genshi: 0.5 Pygments: 0.10 Subversion: 1.4.5 (r25188) jQuery: 1.2.6 TracGuide — The Trac User and Administration Guide -- Comment: Probably the same root cause as #3091. It is also likely that this is one of those issues that has hopefully been resolved with the software update. -- Ticket URL: <http://dev.haiku-os.org/ticket/3094#comment:1> Haiku <http://dev.haiku-os.org> The Haiku operating system. ----------------------------------------------------------------------- haiku-web@xxxxxxxxxxxxx - Haiku Web & Developer Support Discussion List