arara icon indicating copy to clipboard operation
arara copied to clipboard

Unable to call datatooltk from arara, datatooltk gui working

Open Delanii opened this issue 5 years ago • 6 comments

Hello Mr. Cereda, I am trying to learn with datatool and its associate datatooltk to process data from .csv. or .xls files. When I found out, that datatooltk can be used with arara, I wanted to test it. Sadly, with execution from arara I am getting failed process "due to an IO error." Do you have idea what is the cause?

As MWE allow me to suggest an answer in Stack Exchange from Mrs. Talbot (as that code is guaranteed to work):

[(https://tex.stackexchange.com/questions/225438/document-using-datatool-is-slow-to-compile)] ListOfWords.txt

with entries.csv: entries.txt

I am getting this arara.log:

arara.log

I have installed datatooltk as is stated in its readme (to my best knowledge) and have added it to my PATH (checked it with windows cmd command "where"). Moreover, invocation of datatooltk --gui from command line launches program successfully.

I am on Windows 10 with current TeXlive and newest arara rev. 2.

I hope its not too lengthy, you were already kind enough to help me with latexindent (Thank you!), but I am now in front of issue with loading data from database, which has paragraphs in its entries.

Could help me how to make datatooltk work from arara?

Regards, Tomas Krulis

PS: Sorry, learning with GitHub

Delanii avatar Sep 20 '19 16:09 Delanii

What happens if you try running the following from the command prompt?

datatooltk --merge Word refs.dbtex --output entries.dbtex --csv entries.csv --sort Word --noconsole-action gui --filter Used eq 1

nlct avatar Sep 21 '19 09:09 nlct

Hello Mrs. Talbot, thank you for your reply. Invoking command as you wrote from command prompt (or from Windows Power Shell) from project directory doesnt produce anything at all. No entries.dbtex, but also not even an error message...

Delanii avatar Sep 21 '19 15:09 Delanii

Hi Tomas!

There's an entry in the arara.log that gives me a hint on what happened:

20 Zář 2019 18:45:47.898 INFO  - System command: [ datatooltk, --merge, Word, refs.dbtex, --output, entries.dbtex, --csv, entries.csv, --sort, Word, --noconsole-action, gui, --filter, Used, eq, 1 ]
20 Zář 2019 18:45:47.913 ERROR - The system command execution has failed due to an IO error. Are you sure the provided system command exists in your path? It might be a good idea to check the path and see if the command is available. There are more details available on this exception:
20 Zář 2019 18:45:47.913 ERROR - Could not execute [datatooltk, --merge, Word, refs.dbtex, --output, entries.dbtex, --csv, entries.csv, --sort, Word, --noconsole-action, gui, --filter, Used, eq, 1].

This I/O error usually is raised when there's no system command in the underlying operating system. Given that the execution of datatooltk in the terminal, as @nlct suggested, didn't bring anything (we actually need to see the output of such invocation and check any message), it's almost certain that datatooltk isn't installed or not found in the path.

Could you provide the output of running

datatooltk --merge Word refs.dbtex --output entries.dbtex --csv entries.csv --sort Word --noconsole-action gui --filter Used eq 1

in the terminal (command line prompt or PowerShell)?

Thanks!

cereda avatar Sep 23 '19 11:09 cereda

Hello Mr. Cereda! Sorry for my late reply. I actually took a friend of mine to help me to try to troubleshoot this.

First, running command exactly as you wrote it in command prompt (or PowerShell), both with admin rights, doesnt produce anything. No .dbtex file, no error message.

From the "indent" question of mine, I always check PATH when dealing with TeX. I did so again as it is written here:

https://stackoverflow.com/questions/4781772/how-to-test-if-an-executable-exists-in-the-path-from-a-windows-batch-file

by simply typing

where datatooltk

getting:

C:\datatooltk\bin\datatooltk.bat

which is correct (I installed datatooltk directly in disk main root folder, since I hoped that it might make everything easier).

Delanii avatar Sep 24 '19 15:09 Delanii

Try editing datatooltk.bat replacing javaw with java and rerun the datatooltk command.

nlct avatar Sep 24 '19 15:09 nlct

Hello Mrs. Talbot, thank you for your suggestion. My datatooltk.bat now contains:

@start java -Djava.locale.providers=CLDR,JRE -jar "%~dp0\..\lib\datatooltk.jar" %*

If that is correct, I am still stuck on the same situation - suggested command isnt producing anything, testing with arara is producing same logfile (same error).

Delanii avatar Sep 24 '19 16:09 Delanii