Opened 9 years ago

Closed 9 years ago

# Error in resource path

Reported by: Owned by: petrik.michal@… Filipe Correia high Page2DocbookPlugin normal 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)

### comment:1 Changed 9 years ago by Filipe Correia

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 9 years ago by Filipe Correia

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 9 years ago by Filipe Correia

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 9 years ago by petrik.michal@…

Resolution: → fixed new → closed

Hello, it works now! Thank you for fi

Michal

### Modify Ticket

Change Properties