tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

Convertor of cli_tool not working

Open RishabhBhatnagar opened this issue 5 years ago • 2 comments

This is a follow-up of https://github.com/spdx/tools-python/pull/148#discussion_r509255423 .

I've tried running the convertor. But couldn't run it successfully for any of the ways defined in the README.md file.

The following are the ways I tried and the errors they've raised.

convertor --infile file.rdf --outfile output.json raised following error:
Error: Invalid value for '--to' / '-t': invalid choice: undefined. (choose from json, rdf, yaml, xml, tag)
convertor --from rdf file.rdf --to json output.json raised following error:
spdx.parsers.builderexceptions.FileTypeError: INPUT FILETYPE NOT SUPPORTED. (only RDF and TAG format supported)
convertor -f rdf file.rdf -o output.json raised following error:
Error: Invalid value for '--to' / '-t': invalid choice: undefined. (choose from json, rdf, yaml, xml, tag)

If you think I might've made some mistake while running the tool, you can check how I ran it in this google colab file

RishabhBhatnagar avatar Oct 24 '20 06:10 RishabhBhatnagar

Is there any follow-up on the issue? I'm also facing the same error .

TraceyOnim avatar Jun 30 '21 10:06 TraceyOnim

@TraceyOnim not yet... help would be mucho welcomed!

pombredanne avatar Jun 30 '21 11:06 pombredanne

It looks like the issues reported here were actually fixed in https://github.com/spdx/tools-python/pull/174; the errors are gone. However, the same PR caused an issue with the first example where both infile and outfile is used. That is caught by this block and just prints the help message.

I think this issue can be used for this followup problem as the title is sufficiently vague ;-)

nicoweidner avatar Sep 05 '22 12:09 nicoweidner

I'll have a look.

meretp avatar Oct 12 '22 12:10 meretp

Fixed via https://github.com/spdx/tools-python/pull/235

nicoweidner avatar Oct 14 '22 08:10 nicoweidner