[MacPorts] #14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet?
Conversion failed (Error code: 500) and instead
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet? ------------------------------------+--------------------------------------- Reporter: grahamperrin@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.6.0 Keywords: | ------------------------------------+--------------------------------------- [http://www.nabble.com/Re%3A-SmartPrintNG-with-FOP%3A-RuntimeError%3A- Error-executing%3A-%22-opt-local-bin-fop%22--fo-%22-tmp-tmph_UkKm.fo%22-- pdf-%22-tmp-tmpIEwQCN.pdf%22-p15175877s6742.html Re: SmartPrintNG with FOP: RuntimeError: Error executing: "/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf"] and its originating thread [http://www.nabble.com/SmartPrintNG%3A-template-and-stylesheet -%28Conversion-failed-%28Error-code%3A-500%29%29-td15161511s6742.html SmartPrintNG … Conversion failed (Error code: 500)] Please: is what's there symptomatic of a FOP installation error? If I 1. ignore the browser's presentation 2. run the command alone, for example {{{ "/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf" }}} then 3. despite the output {{{ 29-Jan-2008 20:06:15 org.apache.fop.hyphenation.Hyphenator getHyphenationTree SEVERE: Couldn't find hyphenation pattern en_en }}} 4. the PDF is produced and at a glance, the PDF is integral. ---- Another highlight from that thread,
I tried the -q quiet option for fop,
"/opt/local/bin/fop" -q -fo "/tmp/tmpDH442r.fo" -pdf "/tmp/tmplF9uZr.pdf"
but the output seems no more quiet than without the -q option. Curious.
(I shouldn't normally mix two possible issues in one ticket but it helps to have both in context. We can spin off another ticket if necessary.) ---- Thanks for any advice. Graham -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109> MacPorts </projects/macports> Ports system for Mac OS
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet? -------------------------------------+-------------------------------------- Reporter: grahamperrin@gmail.com | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: -------------------------------------+-------------------------------------- Changes (by jmpp@macports.org): * milestone: => Port Bugs -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet? -------------------------------------+-------------------------------------- Reporter: grahamperrin@gmail.com | Owner: boeyms@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: -------------------------------------+-------------------------------------- Changes (by ryandesign@macports.org): * owner: macports-tickets@lists.macosforge.org => boeyms@macports.org Comment: Assigning to maintainer of fop. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109#comment:2> MacPorts </projects/macports> Ports system for Mac OS
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet? -------------------------------------+-------------------------------------- Reporter: grahamperrin@gmail.com | Owner: boeyms@macports.org Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: invalid | Keywords: -------------------------------------+-------------------------------------- Changes (by boeyms@macports.org): * status: new => closed * resolution: => invalid Comment: Replying to [ticket:14109 grahamperrin@gmail.com]:
[http://www.nabble.com/Re%3A-SmartPrintNG-with-FOP%3A-RuntimeError%3A- Error-executing%3A-%22-opt-local-bin-fop%22--fo-%22-tmp-tmph_UkKm.fo%22-- pdf-%22-tmp-tmpIEwQCN.pdf%22-p15175877s6742.html Re: SmartPrintNG with FOP: RuntimeError: Error executing: "/opt/local/bin/fop" -fo "/tmp/tmph_UkKm.fo" -pdf "/tmp/tmpIEwQCN.pdf"] and its originating thread [http://www.nabble.com/SmartPrintNG%3A-template-and-stylesheet -%28Conversion-failed-%28Error-code%3A-500%29%29-td15161511s6742.html SmartPrintNG … Conversion failed (Error code: 500)]
Please: is what's there symptomatic of a FOP installation error? [[BR]]
I'm no FOP expert, but I'm pretty sure that it's not an installation error. Instead, FOP is behaving as intended (though whether or not that's good is another question). The root element of your FO file specifies both `language`(=`"en"`) and `country`(=`"en"`) attributes, for which FOP then tries to find a hyphenation pattern file. Unfortunately, there's no ISO country code `"en"`, much less a country `"en"` that speaks language `"en"` (i.e. English), so it can't find such a file. When this happens, it appears that the FOP code typesets without hyphenations (which is why FOP at the command-line produces a PDF that looks passable), but exits with a non-zero exit code. I assume that SmartPrintNG then detects the non-zero exit code and dutifully reports that there was an error (which is interpreted somewhere along the way as equivalent to the HTTP 500 error code), but either ignores or throws away the PDF that FOP actually produced. (If it just ignores it, the PDF in `/tmp` should remain after SmartPrintNG reports its error.) So, there are a couple of things to do: 1. See if you can change your FO files either to have a valid value for `country` (e.g. `EN`, `AU`, `UK`) that works with `language="en"` (note that FOP might be case-sensitive about this -- [http://xmlgraphics.apache.org/fop/0.94/hyphenation.html their page on hyphenation] suggests it might be), or have no country attribute at all (the FOP hyphenation page says that it'll work without one). 2. If that fails, you'll need to install a hyphenation pattern file for FOP. The above link describes how to do so, but I'll also look into adding such files into MacPorts to save manual installation. [[BR]] ---- As for your second question:
I tried the -q quiet option for fop,
"/opt/local/bin/fop" -q -fo "/tmp/tmpDH442r.fo" -pdf "/tmp/tmplF9uZr.pdf"
but the output seems no more quiet than without the -q option. Curious. [[BR]]
Don't know about this one; `/opt/local/bin/fop` is a shell script wrapper around the Java FOP executable, but the former does appear to pass on the `-q` option to the latter. Perhaps FOP is coded such that `-q` doesn't actually suppress errors classed as `SEVERE`. It'd probably best to ask on the FOP mailing lists. I hope that this helps. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109#comment:3> MacPorts </projects/macports> Ports system for Mac OS
#14109: FOP: two possible issues: (1) SEVERE: Couldn't find hyphenation pattern en_en (2) -q option not quiet? -------------------------------------+-------------------------------------- Reporter: grahamperrin@gmail.com | Owner: boeyms@macports.org Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: invalid | Keywords: -------------------------------------+-------------------------------------- Comment (by grahamperrin@gmail.com): Solved! A careless mistake, see http://thread.gmane.org/gmane.comp.web.zope.plone.user/81544/focus=82108 http://paste.lisp.org/display/55296#4 reminds me that credit is due to [pwgr] in irc://irc.freenode.net/##java (I also spent some time in irc://irc.freenode.net/#apache but gained no answers to FOP-related questions.) Regards [[BR]] Graham -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14109#comment:4> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts