Opened 18 years ago
Closed 18 years ago
#3938 closed defect (worksforme)
formatter.py: wiki_to_onliner sometimes returns '' and sometimes returns a Markup
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
If it returns then text.plaintext fails in line 466 of formatter.py.
This was causing reports 1,2,3 and 8 to fail. This is one a Trac I setup as a learning and evaluating tool. The reports had not been changed. However I had two other Trac projects set up as tests and they were OK.
By changing line 1000 in formatter.py from
return ''
to
return Markup('')
the problem was fixed.
I am using version .10dev as I am experimenting with better control over ticket visibility for some potential clients who are software developers who do not want their clients to see any tickets but the ones they submitted themselves.
The Traceback follows.
Traceback (most recent call last): File "C:\Python23\Lib\site-packages\trac\web\main.py", line 300, in dispatch_request dispatcher.dispatch(req) File "C:\Python23\Lib\site-packages\trac\web\main.py", line 190, in dispatch resp = chosen_handler.process_request(req) File "C:\Python23\Lib\site-packages\trac\ticket\report.py", line 89, in process_request resp = self._render_view(req, db, id) File "C:\Python23\Lib\site-packages\trac\ticket\report.py", line 327, in _render_view absurls=(format == 'rss')) File "C:\Python23\lib\site-packages\trac\wiki\formatter.py", line 995, in wiki_to_html Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines) File "C:\Python23\lib\site-packages\trac\wiki\formatter.py", line 817, in format result = re.sub(self.wiki.rules, self.replace, line) File "c:\python23\lib\sre.py", line 143, in sub return _compile(pattern, 0).sub(repl, string, count) File "C:\Python23\lib\site-packages\trac\wiki\formatter.py", line 763, in replace replacement = self.handle_match(fullmatch) File "C:\Python23\lib\site-packages\trac\wiki\formatter.py", line 759, in handle_match return internal_handler(match, fullmatch) File "C:\Python23\lib\site-packages\trac\wiki\formatter.py", line 466, in _heading_formatter sans_markup = text.plaintext(keeplinebreaks=False).replace('.', '') AttributeError: 'str' object has no attribute 'plaintext'
Attachments (0)
Change History (1)
comment:1 by , 18 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Version: | 0.10 → devel |
… and that's a bit old by now ;) The problem you describe has already been fixed (r3397).
And by the way:
See #3466.