Modify

Opened 6 years ago

Closed 6 years ago

#3552 closed defect (fixed)

Error in resource path

Reported by: petrik.michal@… Owned by: FilipeCorreia
Priority: high Component: Page2DocbookPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

When running script, the following error appears:

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 "/var/lib/python-support/python2.5/trac/wiki/web_ui.py", line 134, in process_request
    page.text, format, page.name)
  File "/var/lib/python-support/python2.5/trac/mimeview/api.py", line 605, in send_converted
    content, selector)
  File "/var/lib/python-support/python2.5/trac/mimeview/api.py", line 385, in convert_content
    output = converter.convert_content(req, mimetype, content, ck)
  File "/var/lib/trac/Project_path/plugins/PageToDocbook-0.6.egg/pagetodocbook/pagetodocbook.py", line 65, in convert_content
    docbook_xmldoc = xhtml2dbXsl_xsldoc.applyStylesheet(xhtml2_xmldoc, None)
AttributeError: 'NoneType' object has no attribute 'applyStylesheet'

I suppose that problem relates to defined path in xsl definition:

<xsl:import href=\"""" + resource_filename(__name__, 'data/html2db/html2db.xsl') + """\" />

and

<xsl:import href=\"""" + resource_filename(__name__, 'data/headingsNormalizer/headingsNormalizer.xsl') + """\" />

Problem can temporarily be solved with defining absolute path

Plugin was installed from an egg file through webAdmin - Trac 10.4

Note: egg file doesn't contain a complete data folder - two directories are missing (xsl definitions)

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by FilipeCorreia

Hi! Thanks for reporting this.

I had already noticed the missing parts of the data folder and have corrected it (although, still not committed it to svn).

A relative path is being enough on my side, but I'll further investigate this.

comment:2 Changed 6 years ago by FilipeCorreia

Haven't come to a conclusion yet, but would like to ask you if you could run trac via tracd and see if the error message persists.

I managed to reproduce the problem on my side, but only when i'm running trac through apache.

comment:3 Changed 6 years ago by FilipeCorreia

I've just commited a new version, and uploaded a new egg file. Please let me know how it works for you.

comment:4 Changed 6 years ago by petrik.michal@…

  • Resolution set to fixed
  • Status changed from new to closed

Hello, it works now!
Thank you for fi

Michal

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.