#2156 closed defect (invalid)
Wiki problem: 'module' object has no attribute 'get_path_rev_line'
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wiki system | Version: | 0.9b2 |
| Severity: | normal | Keywords: | wiki |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
The problem apears when I try to go to WikiFormating! The strange thing is that the problem appears diffrent in diffrent projects! In one project the WikiFormating and TracLinks don't work and in the other two projects just the WikiFormating doesn't work?? I have the latest trunk version but slightly modified, translated to slovenian language! But that shouldn't be a problem, because I checked all the functions in the traceback and there doesn't seem to be any diffrences, except for the encoding of the files! The error traceback listed below:
Traceback (most recent call last):
File "web/modpython_frontend.py", line 206, in handler
File "/home/svn/tmp/Trac/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request
File "/home/svn/tmp/Trac/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch
File "wiki/web_ui.py", line 114, in process_request
File "wiki/web_ui.py", line 361, in _render_view
File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 714, in wiki_to_html
Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 608, in format
result = re.sub(self.rules, self.replace, line)
File "/usr/lib/python2.3/sre.py", line 143, in sub
return _compile(pattern, 0).sub(repl, string, count)
File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 239, in replace
return getattr(self, '_' + itype + '_formatter')(match, fullmatch)
File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 285, in _shref_formatter
return self._make_link(ns, target, match, match)
File "/usr/lib/python2.3/site-packages/trac/wiki/formatter.py", line 301, in _make_link
return self._link_resolvers[ns](self, ns, target, label)
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 244, in _format_link
path, rev, line = util.get_path_rev_line(path)
AttributeError: 'module' object has no attribute 'get_path_rev_line'
Attachments (0)
Change History (8)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
| Milestone: | → 0.9 |
|---|---|
| Priority: | low → normal |
comment:3 by , 20 years ago
No change after updating to latest rev! Same errors and still diffrences between projects!
comment:4 by , 20 years ago
No difference when I add a new project! Problem doesn't occur when trying to access WikiProcessors.
comment:5 by , 20 years ago
Wait a minute, how come do you have:
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/web_ui/browser.py", line 244, in _format_link
path, rev, line = util.get_path_rev_line(path)
in your stack trace? As far as I can tell, there's never been such code in Trac:
In that file, util being known as a module
(source:trunk/trac/versioncontrol/web_ui/browser.py@2290#L21),
the error you see is quite "normal".
comment:6 by , 20 years ago
Sorry about that. It seems that I forgot to update the browser.py! But now the error traceback has changed!
Traceback (most recent call last):
File "web/modpython_frontend.py", line 206, in handler
File "/home/svn/tmp/Trac/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request
File "/home/svn/tmp/Trac/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch
File "wiki/web_ui.py", line 114, in process_request
File "wiki/web_ui.py", line 361, in _render_view
File "formatter.py", line 695, in wiki_to_html
File "formatter.py", line 589, in format
File "/usr/lib/python2.3/sre.py", line 143, in sub
return _compile(pattern, 0).sub(repl, string, count)
File "formatter.py", line 209, in replace
if self.softspace:
File "formatter.py", line 255, in _shref_formatter
self.writer.new_font(font)
File "formatter.py", line 281, in _make_link
self.nospace = 1
File "browser.py", line 244, in _format_link
NameError: global name 'get_path_rev_line' is not defined
I had some problems with importing util.py! It looked like the system could't recognize it or something like that! Could this be the reason, and if it is, how can I repair it. When I do python import there is no message that something went wrong. I noticed this problem when I was trying to import other modules that reference util!
comment:7 by , 20 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Sorry about all this! I imported all modules AGAIN, for the gazilionth time, and the problem went away! Once again sorry for all the trouble!



I made a mistake. The first project reports this error when I click on the WikiFormating, TracLinks and WikiProcessors, the other two projects don't report error on WikiProcessors!