sogno-platform / cimgen

Code generation from CIM data model for several programming languages
Apache License 2.0
13 stars 6 forks source link

CIMgen fails while building with CGMES v3 schema #24

Open bokiloki opened 5 months ago

bokiloki commented 5 months ago

Bug CIMgen v3 fails at line 420 using Docker

Traceback (most recent call last): File "/CIMgen/build.py", line 16, in CIMgen.cim_generate(schema_path, args.outdir, args.cgmes_version, langPack) File "/CIMgen/CIMgen.py", line 685, in cim_generate parsed = _parse_rdf(parse_result, version) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/CIMgen/CIMgen.py", line 420, in _parse_rdf short_package_name[profile_name] = short_profile_name ^^^^^^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'short_profile_name' where it is not associated with a value

To Reproduce

Steps to reproduce the behavior: 1: docker build -t cimgen -f Dockerfile . 2: export SCHEMA_DIR='/home/cimgen-master/cgmes_schema/CGMES_3.0.0' 3: export OUTPUT_DIR='/home/cimgen-master/CGMES_3.0.0_python' 4: docker run -v ${OUTPUT_DIR}:/cgmes_output -v ${SCHEMA_DIR}:/cgmes_schema cimgen --langdir=python

Expected behavior Correct me if I am wrong, if I understand correctly CIMgen generates classes for CIMpy?

Docker on Linux