Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIMgen fails while building with CGMES v3 schema #24

Closed
bokiloki opened this issue Jan 22, 2024 · 2 comments
Closed

CIMgen fails while building with CGMES v3 schema #24

bokiloki opened this issue Jan 22, 2024 · 2 comments

Comments

@bokiloki
Copy link

bokiloki commented Jan 22, 2024

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

  • OS: openSuSe Leap 15.5
  • Docker: version 24.0.5-ce
@tom-hg57
Copy link
Collaborator

The option --cgmes_version=cgmes_v3_0_0 is missing.

See README change in #34.

@chicco785
Copy link
Collaborator

i think this is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants