Opened 3 years ago
Last modified 14 months ago
#1028 new defect
AttributeError in Upcoming Events
Reported by: | makub | Owned by: | arescope |
---|---|---|---|
Priority: | normal | Milestone: | v0.98.2 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
On a fresh installation of Indico 0.98.1 with empty database, the admins page in Server admin - Homepage - Upcoming Events is not displayed due to the following exception:
2012-05-10 13:26:57,467 indico.requestHandler - ERROR base.py:363 -- Request 140624552881808 failed: "'int' object has no attribute 'seconds'" Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/rh/base.py", line 565, in process res = self._process() File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/rh/admins.py", line 98, in _process return p.display() File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/base.py", line 189, in display self._display( params ), \ File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/main.py", line 159, in _display body = WMainBase(self._getBody( params ), self._timezone, self._getNavigationDrawer(), File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/admins.py", line 134, in _getBody p = { "body": self._getPageContent( params ), File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/admins.py", line 280, in _getPageContent return wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/admins.py", line 318, in _getTabContent return wc.getHTML( pars ) File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/wcomponents.py", line 212, in getHTML vars = self.getVars() File "/usr/local/lib/python2.6/dist-packages/indico-0.98.1-py2.6.egg/MaKaC/webinterface/pages/admins.py", line 325, in getVars vars["cacheTTL"] = module.getCacheTTL().seconds/60 AttributeError: 'int' object has no attribute 'seconds'
A fix is to remove the ".seconds" from line 325 in admins.py
Change History (6)
comment:1 Changed 3 years ago by arescope
- Owner set to arescope
- Status changed from new to assigned
comment:2 Changed 3 years ago by arescope
- Status changed from assigned to in_work
comment:3 Changed 3 years ago by arescope
- Status changed from in_work to awaiting_merge
comment:4 Changed 3 years ago by Alberto Resco Perez <alberto.resco.perez@…>
- Resolution set to fixed
- Status changed from awaiting_merge to closed
comment:5 Changed 3 years ago by Alberto Resco Perez <alberto.resco.perez@…>
comment:6 Changed 14 months ago by chrisesa
- Resolution fixed deleted
- Status changed from closed to new
This is still a bug in 1.2. I get the same traceback, though with different line numbers, ending
File "/usr/lib/python2.6/site-packages/indico-1.2-py2.6.egg/MaKaC/webinterface/pages/admins.py", line 329, in getVars
varscacheTTL? = module.getCacheTTL().seconds/60
The fix from the original submitter (removing .seconds) still works.
Note: See
TracTickets for help on using
tickets.
In [0ceef33ee09c97061b4fd4a2397814033019b7bd/indico]: