ort: Provide more specific stack trace for config.yml parse error?
Hello, I have problems on parsing my project specific config.yml
. It seems to caused by an indentation error.
As it is hard to find the belonging line I would like to ask if it is possible also to provide the specific error category or at least the line in config.yml as it is the case when parsing NOTICE file templates.
Thank you very much.
13:43:43.361 [main] INFO org.ossreviewtoolkit.model.config.OrtConfiguration - Using ORT configuration file '/project/ort/config.yml'.
Exception in thread "main" java.lang.IllegalArgumentException: Failed to load ORT configuration: **Could not parse /project/ort/config.yml**
at org.ossreviewtoolkit.model.config.OrtConfiguration$Companion$load$1.invoke(OrtConfiguration.kt:156)
at org.ossreviewtoolkit.model.config.OrtConfiguration$Companion$load$1.invoke(OrtConfiguration.kt:155)
at com.sksamuel.hoplite.fp.ValidatedKt.getOrElse(Validated.kt:115)
at org.ossreviewtoolkit.model.config.OrtConfiguration$Companion.load(OrtConfiguration.kt:155)
at org.ossreviewtoolkit.cli.OrtMain.run(OrtMain.kt:171)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at org.ossreviewtoolkit.cli.OrtMainKt.main(OrtMain.kt:76)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (9 by maintainers)
So, if you just renamed
ort.conf
toconfig.yml
this cannot work. You also need to convert the file’s contents from HOCON to YAML. Theort config --hocon-to-yaml
command can assist with this.That does not really mean anything… it could be a HOCON (
*.conf
) file that has been renamed to*.yml
.