robot icon indicating copy to clipboard operation
robot copied to clipboard

Error in Robot command running (windows)

Open marco-medici opened this issue 3 years ago • 11 comments

Well, I try to run this command line (and others similar):

robot template --template robot_pesticide.tsv --input "peston-merged.owl" --prefix "PESTON:http://purl.obolibrary.org/obo/PESTON_" --ontology-iri "http://purl.obolibrary.org/obo/peston/imports/pesticide_import.owl" --output pesticide_import.owl

and I get 'object cannot be null' caused by a not valid IRI. Note that in Mac it works fine, but for Windows is erroring for every line...

1 I

marco-medici avatar Nov 28 '21 12:11 marco-medici

Would you be able to share your template?

matentzn avatar Nov 28 '21 13:11 matentzn

sure, here it is robot_pesticide.zip .

marco-medici avatar Nov 28 '21 17:11 marco-medici

Hmm. Maybe it has to do with the encoding of UPL HOLDINGS CO…PERATIEF U.A.? I cant run the robot command w/o the ontology, but it not working on Windows smells of encoding..

matentzn avatar Nov 28 '21 17:11 matentzn

Hmm. Maybe it has to do with the encoding of UPL HOLDINGS CO…PERATIEF U.A.? I cant run the robot command w/o the ontology, but it not working on Windows smells of encoding..

Thanks for the suggestion. I've re-imported data with windows encoding, unfurtunately I still get the error. Also I've removed records with commas since robot may intepret a single string as more than a word, but all the other column errors are stil coming up.

marco-medici avatar Nov 29 '21 11:11 marco-medici

Maybe @beckyjackson or @jamesaoverton have an idea - we may need your ontology for debugging if it's at all possible..

matentzn avatar Nov 29 '21 11:11 matentzn

@beckyjackson and I don't have access to Windows machines, but I'll ask her to take a look.

jamesaoverton avatar Nov 29 '21 15:11 jamesaoverton

I have access to a windows machine, but I would need peston-merged.owl

matentzn avatar Nov 29 '21 17:11 matentzn

Hi folks, Everything is in https://github.com/marco-medici/peston/ , with peston-merged.owl referenced to cover all name lookups: https://github.com/marco-medici/peston/blob/main/src/ontology/imports/peston-merged.owl

Thanks for looking into this. I guess it is about encodings too, but when I created the TSV files it was a straight "file -> new" from SublimeText on a mac. I thought maybe there would be line ending shenanigans, but a resave of file via excel in windows didn't seem to fix it.

ddooley avatar Nov 29 '21 18:11 ddooley

I did cut and paste google sheet content right into that robot_pesticide.tsv text file so I guess that was a route for UTF-8 stuff to get in there.

ddooley avatar Nov 29 '21 18:11 ddooley

Ok, @matentzn can you please try under Windows, when you get a chance?

jamesaoverton avatar Nov 29 '21 20:11 jamesaoverton

Ok I looked at it a bit. There will be other problems, but encoding is def. one of them. You can debug this by basically just looking at the first 5 rows of the template (they compile fine to OWL). This UPL Holding string is definitely causing an issue.. NOt really a ROBOT issue! You will have to clean your table to remove the encoding problems...

matentzn avatar Nov 29 '21 21:11 matentzn