pyoscx / scenariogeneration

Python library to generate linked OpenDRIVE and OpenSCENARIO files
Mozilla Public License 2.0
258 stars 80 forks source link

FR: better error messages for `oscx.ParseOpenScenario` #183

Open zwergziege opened 10 months ago

zwergziege commented 10 months ago

Currently, oscx.ParseOpenScenario just raises an exception if the input data is invalid without providing much information to what failed. This could be improved by validating the input first, e.g. using the xmlschema package and the schema files provided by the OpenScenario standard. This could also be used to easier detect bugs such as #113, #130 and #182. Edit: Maybe it even makes sense to use xsdata to get native bindings.

mander76 commented 10 months ago

Well, that could be a solution, but it will probably not make the parsing better. However it could possibly give a quite input what is wrong.. Should try to look into it.

mander76 commented 10 months ago

I have looked at it quickly, but have an issue actually including other files in the release (the schema files that is). They exist in the tar.gz but when I install they don't appear in the site-package folder (same for LICENSE), so right now I'm not sure what is wrong and how to solve it..

zwergziege commented 10 months ago

If you're having troubles with the archive, you can also find the schema here. As for the license: It is essentially the one here except that "the licensor grants everyone a basic, non-exclusive and unlimited license to use the standard ASAM OpenSCENARIO" (taken from here)

mander76 commented 10 months ago

I have the schemas here and talked to ASAM about it. But in order to use them they have to be included in the package. That's what I have problems with.

zwergziege commented 10 months ago

Ah, sorry. I misunderstood.