Modify

Opened 16 years ago

Last modified 15 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

Description

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/formatter.py", line 468, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 179, in process
    text = self.processor(text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 166, in _macro_processor
    text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/macros.py", line 425, in expand_macro
    if attachment and 'ATTACHMENT_VIEW' in formatter.perm(attachment):
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 523, in has_permission
    return self._has_permission(action, resource)
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 536, in _has_permission
    decision = PermissionSystem(self.env). \
  File "/usr/lib/python2.4/site-packages/trac/perm.py", line 431, in check_permission
    self.log.debug("No policy allowed %s performing %s on %r" %
  File "/usr/lib/python2.4/site-packages/trac/resource.py", 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 15 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 15 years ago by Filipe Correia

Might be related to #5856.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.