Modify ↓
#13181 closed defect (fixed)
AttributeError: 'dict' object has no attribute 'getlist' when calling hours
Reported by: | anonymous | Owned by: | EmeCas |
---|---|---|---|
Priority: | normal | Component: | TracHoursPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Hello!
when i try to call hours/ i get the following error. Calling hours/xy works as expected.
Trac detected an internal error: AttributeError: 'dict' object has no attribute 'getlist'
Stacktrace:
Python Traceback Most recent call last: File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 562, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 249, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-x86_64/egg/trachours/hours.py", line 224, in process_request return self.process_timeline(req) File "build/bdist.linux-x86_64/egg/trachours/hours.py", line 491, in process_timeline return self.display_html(req, query) File "build/bdist.linux-x86_64/egg/trachours/hours.py", line 827, in display_html add_link(req, 'prev', self.get_href(query, prev_args, context.href), File "build/bdist.linux-x86_64/egg/trachours/hours.py", line 534, in get_href cols = args.getlist('col')
Code (hours.py):
532 def get_href(self, query, args, *a, **kw): 533 base = query.get_href(*a, **kw) 534 cols = args.getlist('col')
System:
Trac 1.0.12 Docutils 0.12 Genshi 0.7 (with speedups) psycopg2 2.6 Pygments 2.1.3 Python 2.7.12 (default, Jun 28 2016, 06:57:42) [GCC] pytz 2015.2 RPC 1.1.7.dev0 setuptools 18.0.1 Textile 2.3.10 jQuery 1.7.2 jQuery UI 1.8.21 jQuery Timepicker 1.0.1
Attachments (0)
Change History (4)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
I caused the issue in r16474. Probably just need to revert the change:
-
trachours/hours.py
527 527 528 528 def get_href(self, query, args, *a, **kw): 529 529 base = query.get_href(*a, **kw) 530 cols = args.getlist('col')531 530 if cols: 531 if isinstance(cols, basestring): 532 cols = [cols] 532 533 base += '&' + "&".join("col=%s" % col 533 534 for col in cols if col not in query.cols)
Note: See
TracTickets for help on using
tickets.
What version of TracHoursPlugin are you running?