Modify

Opened 16 years ago

Closed 12 years ago

#3335 closed defect (wontfix)

rendering of attached embedded images fails with error trace back

Reported by: bernd.tegge@… Owned by: Alec Thomas
Priority: normal Component: PageToPdfPlugin
Severity: normal Keywords: ATTACHMENT_VIEW
Cc: Filipe Correia Trac Release: 0.11

Description

Trying to convert a wiki page with Image-macros for attached image files generates the following output in the system log.

Jul  7 14:59:11 trac-test Trac[formatter] DEBUG: Executing Wiki macro Image by provider <trac.wiki.macros.ImageMacro object at 0x80b6c86c>
ERROR: Macro Image(Weggen2.jpg, align=left) failed Traceback (most recent call last): 
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 468, in _macro_formatter
        return macro.process(args, in_paragraph=True)
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 179, in process
	    text = self.processor(text)
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/formatter.py", line 166, in _macro_processor
        text)
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/wiki/macros.py", line 425, in expand_macro
        if attachment and 'ATTACHMENT_VIEW' in formatter.perm(attachment):   
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 523, in has_permission
        return self._has_permission(action, resource)   
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 537, in _has_permission 
       check_permission(action, perm.username, resource, perm)
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/perm.py", line 432, in check_permission
        (username, action, resource))
   File "/usr/local/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/resource.py", line 111, in __repr__ 
       return '<Resource %r>' % (', '.join(reversed(path)))
   TypeError: sequence item 0: expected string, NoneType found
Jul  7 14:59:11 trac-test Trac[pagetopdf] DEBUG: --right 1.5cm --bottom 1.5cm --webpage  --top 1cm --format pdf14 --size a4 --charset iso-8859-1 --left 1cm
Jul  7 14:59:12 trac-test Trac[main] DEBUG: 384 unreachable objects found.

If I understand the use of ATTACHMENT_* permissions correctly, they should be translated to specific permissions for the requested realm, however that seems to be missing from the parameters to wiki_to_html?

See also #2240 for the same problem in the EclipseTracPlugin.

Attachments (0)

Change History (5)

comment:1 Changed 16 years ago by Alec Thomas

This plugin hasn't been ported to 0.11. Patches welcome, maintainers even more welcome.

comment:2 Changed 16 years ago by asperon

I have the same problem, and it exists in TracWikiToPdfPlugin

comment:3 Changed 16 years ago by Filipe Correia

Cc: Filipe Correia added; anonymous removed

Has anyone already came up with a patch to this issue?

comment:4 Changed 15 years ago by Viktor Ferenczi

See #5856 for a somewhat cumbersome workaround.

comment:5 Changed 12 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Deprecated, please see the TracWikiToPdfPlugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.