Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 12 years ago

#2156 closed defect (invalid)

Wiki problem: 'module' object has no attribute 'get_path_rev_line'

Reported by: zgantar@… 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 anonymous, 19 years ago

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!

comment:2 by Christian Boos, 19 years ago

Milestone: 0.9
Priority: lownormal

The strange thing is that the problem appears diffrent in diffrent projects''

This makes me think it might be the same issue as the one reported in #2138. Please try again with the latest trunk (rev ≥ r2313).

comment:3 by anonymous, 19 years ago

No change after updating to latest rev! Same errors and still diffrences between projects!

comment:4 by anonymous, 19 years ago

No difference when I add a new project! Problem doesn't occur when trying to access WikiProcessors.

comment:5 by Christian Boos, 19 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:

  • r2290: path, rev, line = get_path_rev_line(path)
  • r2276 and before: path, rev = get_path_rev(path)

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 anonymous, 19 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 anonymous, 19 years ago

Resolution: invalid
Status: newclosed

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!

comment:8 by Christian Boos, 12 years ago

Milestone: 0.9

(clearing report:35)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.