Modify ↓
#12573 closed defect (fixed)
ValueError: invalid literal for int() with base 10: 'rev'
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
Errors should be trapped so that we don't get tracebacks such as the following in the logs:
2015-11-11 15:32:00,042 Trac[formatter] ERROR: Macro Include(IncludeMacro@rev) failed: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 789, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 358, in process text = self.processor(text) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 345, in _macro_processor text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracIncludeMacro-3.0.0dev-py2.6.egg/includemacro/macros.py", line 103, in expand_macro page = WikiPage(self.env, page_name, page_version) File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 45, in __init__ version = int(version) # must be a number or None ValueError: invalid literal for int() with base 10: 'rev' 2015-11-11 15:32:22,020 Trac[formatter] ERROR: Macro Include(IncludeMacro@rev14) failed: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 789, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 358, in process text = self.processor(text) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 345, in _macro_processor text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracIncludeMacro-3.0.0dev-py2.6.egg/includemacro/macros.py", line 103, in expand_macro page = WikiPage(self.env, page_name, page_version) File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 45, in __init__ version = int(version) # must be a number or None ValueError: invalid literal for int() with base 10: 'rev14' 2015-11-11 15:33:39,632 Trac[formatter] ERROR: Macro Include(IncludeMacro@rev#14) failed: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 789, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 358, in process text = self.processor(text) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 345, in _macro_processor text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracIncludeMacro-3.0.0dev-py2.6.egg/includemacro/macros.py", line 103, in expand_macro page = WikiPage(self.env, page_name, page_version) File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 45, in __init__ version = int(version) # must be a number or None ValueError: invalid literal for int() with base 10: 'rev#14' 2015-11-11 15:33:46,802 Trac[formatter] ERROR: Macro Include(IncludeMacro@rev14) failed: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 789, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 358, in process text = self.processor(text) File "build/bdist.linux-i686/egg/trac/wiki/formatter.py", line 345, in _macro_processor text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracIncludeMacro-3.0.0dev-py2.6.egg/includemacro/macros.py", line 103, in expand_macro page = WikiPage(self.env, page_name, page_version) File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 45, in __init__ version = int(version) # must be a number or None ValueError: invalid literal for int() with base 10: 'rev14'
Attachments (0)
Change History (5)
comment:1 Changed 9 years ago by
Status: | new → accepted |
---|
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
Created trac:#12273 to make WikiPage
class more robust to an invalid version
argument. Created trac:#12274 to trap negative revision numbers with the Subversion backend.
Note: See
TracTickets for help on using
tickets.
In 15118: