Opened 9 years ago
Closed 9 years ago
#12758 closed defect (worksforme)
Error saying "HTMLDOC is not installed" even though it is
Reported by: | anonymous | Owned by: | Diorgenes Felipe Grzesiuk |
---|---|---|---|
Priority: | normal | Component: | TracWikiToPdfPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
TrackWikiToPdfPlugin is installed via the easy_install method and is showing up and enabled in the admin section.
When I click to create a PDF/HTML/PS I get the error "HTMLDOC is not installed" although it is.
The system is FreeBSD 10.3 totally up to date and running the latest available versions of all programs (packages). Version of Trac in use is 1.0.9.
test:/ # htmldoc --version 1.8.28
test:/ # python Python 2.7.11 (default, Jan 20 2016, 15:37:30) [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.Popen(('htmldoc', '--version'), stdout=subprocess.PIPE).communicate()[0] '1.8.28\n' >>>
Any help getting this working would be greatly appreciated!
Attachments (0)
Change History (19)
comment:2 Changed 9 years ago by
Thanks for the answer but I now get the error
Trac detected an internal error: NameError: global name 'self' is not defined
Python Traceback Most recent call last: File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request File "/usr/local/lib/python2.7/site-packages/trac/web/main.py", line 247, in dispatch File "/usr/local/lib/python2.7/site-packages/trac/admin/web_ui.py", line 119, in process_request File "build/bdist.freebsd-10.3-RELEASE-amd64/egg/wikitopdf/web_ui.py", line 68, in render_admin_panel File "build/bdist.freebsd-10.3-RELEASE-amd64/egg/wikitopdf/formats.py", line 52, in process_wikitopdf File "build/bdist.freebsd-10.3-RELEASE-amd64/egg/wikitopdf/wikitopdf.py", line 183, in html_to_pdf
comment:3 Changed 9 years ago by
comment:4 Changed 9 years ago by
Made the change and this is what I get in the error log:
Apr 29 15:21:53 noc Trac[wikitopdf] ERROR: Error checking htmldoc version: [Errno 2] No such file or directory Apr 29 15:21:53 noc Trac[main] WARNING: [107.202.12.23] HTTPInternalError: 500 Trac Error (HTMLDOC is not installed.)
comment:5 Changed 9 years ago by
Maybe check where htmldoc is installed relative to the Trac egg. It might be that htmldoc is not on the path of the user under such the Trac process is running. Are you running TracStandalone or a Web server?
comment:7 follow-up: 16 Changed 9 years ago by
Trac is running under apache as the user www which has access to run htmldoc
test:~ # su -m www test:~ $ which htmldoc /usr/local/bin/htmldoc test:~ $ htmldoc HTMLDOC Version 1.8.28 Copyright 1997-2010 Easy Software Products. All rights reserved. This software is based in part on the work of the Independent JPEG Group. ...
comment:11 Changed 9 years ago by
After [15532], you could try setting the path to the HTMLDOC binary:
[wikitopdf] htmldoc_path = /usr/local/bin/htmldoc
comment:12 Changed 9 years ago by
Thanks. Got a little farther... I now get the error:
Trac Error OSError: [Errno 2] No such file or directory
and essentially the same thing in the log file.
Here's the relevant section from trac.ini:
[wikitopdf] base_dir = /home/trac folder_name = EXAMPLE htmldoc_path = /usr/local/bin/htmldoc link = https://example.com/example/ tmp_dir = /tmp
comment:14 Changed 9 years ago by
There's a 1.0 branch now that adds additional changes described in #6604.
I'm not familiar with FreeBSD, but I can only imagine that this is somehow a permissions issue.
comment:15 Changed 9 years ago by
I've tried everything I can possibly think of but still get the error. Not sure what else to try but I'll keep at it. Thanks for the help getting it this far.
comment:16 Changed 9 years ago by
Replying to anonymous:
Trac is running under apache as the user www which has access to run htmldoc
Are you running with mod_wsgi or mod_python?
comment:17 Changed 9 years ago by
You could try running TracStandalone to see if it works with that configuration.
comment:18 Changed 9 years ago by
Well, it suddenly decided to work. I've tried several things so not sure what it ended up being in the end but it does work now. Thanks for the help, I really appreciate it!
Maybe we can log the exception and get more information: browser:/tracwikitopdfplugin/0.11/wikitopdf/wikitopdf.py@11507:180,182,183#L174.