Opened 9 years ago

Last modified 9 years ago

#4016 new defect

Error dealing with image macros

Reported by: Filipe Correia Owned by: Filipe Correia
Priority: normal Component: Page2DocbookPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


The following error is happening when image attachments are user and included by using the image macro:

2008-10-31 17:24:22,102 Trac[formatter] ERROR: Macro Image(0001.png, 300) failed
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 468, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 179, in process
    text = self.processor(text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 166, in _macro_processor
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 425, in expand_macro
    if attachment and 'ATTACHMENT_VIEW' in formatter.perm(attachment):
  File "/usr/lib/python2.4/site-packages/trac/", line 523, in has_permission
    return self._has_permission(action, resource)
  File "/usr/lib/python2.4/site-packages/trac/", line 536, in _has_permission
    decision = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/", line 431, in check_permission
    self.log.debug("No policy allowed %s performing %s on %r" %
  File "/usr/lib/python2.4/site-packages/trac/", line 111, in __repr__
    return '<Resource %r>' % (', '.join(reversed(path)))
TypeError: sequence item 0: expected string, NoneType found

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by Filipe Correia

I am not managing to reproduce this now. Perhaps it was happening only with a specific version of trac or a related library.

comment:2 Changed 9 years ago by Filipe Correia

Might be related to #5856.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Filipe Correia.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.