Am 06.02.2021 um 15:10 schrieb Pavel Sanda <sa...@lyx.org>:
> 
> On Sat, Feb 06, 2021 at 02:49:04PM +0100, Pavel Sanda wrote:
>> Command to execute:
>> "java" -jar "/home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar" 
>> Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl 
>> base.dir=/tmp/tmpnc1DfX
>> docbook2epub fails
>> sh: 1: java -jar /home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar 
>> Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl 
>> base.dir=/tmp/tmpnc1DfX: not found
>> Systemcall.cpp (291): Systemcall: 'python 
>> "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py" "java" "Intro.xml" 
>> "Intro.epub"' finished with exit code 1
>> Error: Cannot convert file
>> 
>> Not sure what went wrong, but going to terminal I do not see /tmp/tmpnc1DfX 
>> created.
>> Manually creating and running the java command leads to:
> 
> The problem is not nonexistent dir, but qoutation for command, that's fixed by
> -    if os.system('"' + command + '"') != 0:
> +    if os.system(command) != 0:
> 
> Now it continues by:
> Command to execute:
> "java" -jar "/home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar" 
> Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl 
> base.dir=/tmp/tmp31wRYV
> Generated ePub contents.
> Writing /tmp/tmp31wRYV/OEBPS/toc.ncx for article
> Traceback (most recent call last):
>  File "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py", line 61, in <module>
>    for file in glob.glob(output_dir + '/**/*', recursive=True):
> TypeError: glob() got an unexpected keyword argument 'recursive'
> Systemcall.cpp (291): Systemcall: 'python 
> "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py" "java" "Intro.xml" 
> "Intro.epub"' finished with exit code 1
> Error: Cannot convert file
> 
> I am not pythonist, so I leave an unexpected keyword argument 'recursive' to 
> someone else. 

Thank you Pavel for exploring the first hurdles. I’m successful with your help 
on Mac with the attached patch. This works with python 2.7.16.

Stephan

Attachment: docbook2epub.patch
Description: Binary data

Attachment: Intro.epub
Description: application/epub

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to