Edgewall Software

Opened 5 years ago

Closed 5 years ago

#12555 closed defect (fixed)

TracError: No filespec given

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.13
Component: wiki system Version:
Severity: normal Keywords: imagemacro
Cc: Branch:
Release Notes:

Image macro returns a system_message when the image can't be rendered.

API Changes:
Internal Changes:


We should return a system_message and log the error rather than raising an exception:

[pid 12594 140268838594304] 2016-08-06 23:07:23,402 Trac[formatter] ERROR: Macro Image(attachment:appveyor-kb-logo.png:wiki:TracDev/AutomaticBuilds) failed:
Traceback (most recent call last):
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 802, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 379, in process
    text = self.processor(text)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 351, in _macro_processor
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/macros.py", line 677, in expand_macro
    raise TracError(_("No filespec given"))
TracError: No filespec given

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 5 years ago

Release Notes: modified (diff)

Proposed changes in log:rjollos.git:t12555.

comment:2 by Ryan J Ollos, 5 years ago

It looks like I accidentally pushed this branch to the GitHub mirror. Deleted now.

comment:3 by Jun Omae, 5 years ago

I think setting invalid url to pushurl could prevent accidental pushing like this:

$ git remote set-url --push mirror no_push
$ git remote -v | grep mirror
mirror  http://svn.edgewall.org/git/trac/mirror (fetch)
mirror  no_push (push)
$ git push mirror x
fatal: 'no_push' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ git fetch mirror
$ echo $?
0   # git-fetch works

See also http://stackoverflow.com/a/10260389/709074

comment:4 by Ryan J Ollos, 5 years ago

That works, thanks. Documented in TracTeam/Repositories@13.

comment:5 by Ryan J Ollos, 5 years ago

Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in r15087, merged to 1.2-stable in r15088, merged to trunk in r15089.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.