Ticket #3779 (new defect)

Opened 5 months ago

Last modified 2 months ago

No PDF Export - Problem with template_path - probable reason found

Reported by: anonymous Assigned to: diorgenes
Priority: normal Component: TracWikiToPdfPlugin
Severity: normal Keywords: internal error, template_path
Cc: Trac Release: 0.11

Description

I get an internal error, when I want to use the TracWikiToPdfPlugin Python Traceback

Traceback (most recent call last):

File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request

dispatcher.dispatch(req)

File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r5911-py2.5.egg/webadmin/web_ui.py", line 119, in process_request

path_info)

File "build/bdist.linux-i686/egg/wikitopdf/web_ui.py", line 61, in process_admin_request

return formats[format]provider?.process_wikitopdf(req, format, title, subject, rightpages, date, version, rightpages[0])

File "build/bdist.linux-i686/egg/wikitopdf/formats.py", line 50, in process_wikitopdf

titlefile = self.get_titlepage(title_template, title, subject, date, version)

File "build/bdist.linux-i686/egg/wikitopdf/formats.py", line 133, in get_titlepage

file_page = open(template_path, 'r')

IOError: [Errno 2] No such file or directory:

Attachments

Change History

09/22/08 16:52:42 changed by A.Spangler@osb-ag.de

How should I create, name and install a suitable template file for TracWikiToPdfPlugin ?? I think, that this file is missing, so that no PDF export works.

11/26/08 02:35:40 changed by anonymous

I am getting the same problem.. has anybody got this plugin working?

01/08/09 11:44:18 changed by anonymous

I also have this problem. Any solution likely or alternative strategy?

(follow-up: ↓ 5 ) 01/12/09 14:57:36 changed by batt

Same problem here, is this plugin working or is it broken?

(in reply to: ↑ 4 ) 01/12/09 15:06:03 changed by anonymous

Replying to batt:

Same problem here, is this plugin working or is it broken?

I recommended use version 0.11 (Trac) and 2.2.2 (plugin)

01/12/09 15:32:40 changed by Achim.Spangler@mnet-online.de

  • release changed from 0.10 to 0.11.
  • summary changed from No PDF Export - Problem with template_path to No PDF Export - Problem with template_path - probable reason found.

Hi, I got it working after several tries.

I think most important changes were:

  • delete argument "template_path" with "del htmldoc_args['template_path' " around line 68 before defining "args_string" --> this parameter is no more accepted by htmldoc
  • (( maybe no more needed )) override codepage from derived codepage to 'iso-8859-15' (wikitopdf/formats.py, wikitopdf/wikitopdf.py)

I will try to optimize the htmldoc call parameters to optimize table layout - cutting off of some columns. The htmldoc website lists the parameter "--browserwidth pixels" to control the width of browser window. This should be defined corresponding to page size and resolution. The documentation of htmldoc refers to this parameter in case of table column cut-off.

I did my changes against version 4224 from subversion repo. I do not know whether this is part of plugin version 2.2.2.

My htmldoc version is 1.8.27 (ubuntu/hardy).

Another remaining problem: I get to table of content. Maybe this is planned to work only for PDF Export for group of WIKI pages?

Hope it helps, Achim

01/12/09 15:34:24 changed by Achim.Spangler@mnet-online.de

Hi, forgot to name the file, where the change is needed: Change "wikitopdf/wikitopdf.py".

I have no clean diff, as I tried also the somewhere posted patch for better image handling - which works fine.

Bye, Achim


Add/Change #3779 (No PDF Export - Problem with template_path - probable reason found)




Change Properties
Action