petermr / tigr2ess

Materials for TIGR2ESS workshop in Delhi Feb 2019 - joint UK(Cambridge) - India project on Food Security.
Other
4 stars 10 forks source link

ami-dictionary translate #17

Closed ambarishK closed 5 years ago

ambarishK commented 5 years ago

ami-dictionaries translate --input /home/ambarish123/rice.xml --outformats JSON
sir, please correct the command. It raises java null pointer exception.

petermr commented 5 years ago

You must give the stack trace. and all the output. Does the file exist? the outformats may be case-sensitive, Can you check that there wasn't a parsing error (normally in red)

petermr commented 5 years ago

I ran:

ami-dictionaries --outformats JSON

and got the output:

Invalid value for option '--outformats' at index 0 (output format): expected one of [xml, html, json] (case-sensitive) but was 'JSON'

can you check that you got this error. Also the output gives:

Specific values (AMIDictionaryTool)
================================
dataCols      null
dictionary    null
dictionaryTop     null
href          null
hrefCols      null
input         null
informat      null
dictInformat  null
linkCol       null
log4j         null
nameCol       null
operation     help
outformats    [xml]
splitCol      ,
termCol       null
terms         null

so you can see the outformats are set to the default (xml). Actually I think we should have no default so I will reset this to null.

petermr commented 5 years ago

I believe this is because currently directory is a mandatory option for translate. I will fix this.