Modify ↓
      
        Opened 17 years ago
Last modified 16 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)
Note: See
        TracTickets for help on using
        tickets.
    



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