Page MenuHomePhabricator

Wikisource Export: Exit Code: 2(Misuse of shell builtins) (only reproducible on wsexport-test)
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

When exporting one particular ebook (below) via wsexport-test, I get the error:

The command "'ebook-convert' '/mnt/nfs/labstore-secondary-tools-project/wsexport-test/tool/temp/wsexport-test/ws-c0_Robinson_Crusoe-67892099456377.epub' '/mnt/nfs/labstore-secondary-tools-project/wsexport-test/tool/temp/wsexport-test/ws-c0_Robinson_Crusoe-67891453690093.pdf' '--page-breaks-before' '/' '--paper-size' 'a5' '--pdf-page-margin-bottom' '32' '--pdf-page-margin-top' '40' '--pdf-page-margin-left' '24' '--pdf-page-margin-right' '24' '--pdf-page-numbers' '--preserve-cover-aspect-ratio'" failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: /mnt/nfs/labstore-secondary-tools-project/wsexport-test/tool/public

Output:
================


Error Output:
================
Usage: ebook-convert input_file output_file [options]

Convert an ebook from one format to another.

input_file is the input and output_file is the output. Both must be specified as the first two arguments to the command.

The output ebook format is guessed from the file extension of output_file. output_file can also be of the special format .EXT where EXT is the output file extension. In this case, the name of the output file is derived from the name of the input file. Note that the filenames must not start with a hyphen. Finally, if output_file has no extension, then it is treated as a directory and an "open ebook" (OEB) consisting of HTML files is written to that directory. These files are the files that would normally have been passed to the output plugin.

After specifying the input and output file you can customize the conversion by specifying various options. The available options depend on the input and output file types. To get help on them specify the input and output file and then use the -h option.

For full documentation of the conversion system see
https://manual.calibre-ebook.com/conversion.html

Whenever you pass arguments to ebook-convert that have spaces in them, enclose the arguments in quotation marks. For example "C:\some path with spaces"

ebook-convert: error: no such option: --pdf-page-margin-bottom

I have only seen this happen on that particular ebook so far, and only on wsexport-test.

Links to reproduce problem

Event Timeline

I can't replicate the "error: no such option: --pdf-page-margin-bottom". I wonder if it was something to do with running on Toolforge and now we're on VPS it's gone away?

I did notice that the above URL was not working any more (missing a slash):

$ curl -I 'https://wsexport-test.toolforge.org/book.php?lang=fr&page=Robinson_Cruso%C3%A9&format=pdf-a5&fonts='
HTTP/2 301 
location: https://ws-export-test.wmcloud.orgbook.php?lang=fr&page=Robinson_Cruso%C3%A9&format=pdf-a5&fonts=

But the same thing on prod is fine, so it wasn't a big problem. Anyway, fixed on test now.

tstarling subscribed.

Apparently fixed.