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

about cim_import #38

Open
zhizhuaa opened this issue Jul 22, 2024 · 1 comment
Open

about cim_import #38

zhizhuaa opened this issue Jul 22, 2024 · 1 comment

Comments

@zhizhuaa
Copy link

import logging
import cimpy
from pathlib import Path

logging.basicConfig(filename='importCIGREMV.log', level=logging.INFO, filemode='w')

example = Path('.').resolve()
sample_folder = example

sample_files = sample_folder.glob('*.xml')

xml_files = []
for file in sample_folder.glob('*.xml'):
xml_files.append(str(file.absolute()))

import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")

An error occurred when executing to import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")

import_result = cimpy.cim_import(xml_files, "cgmes_v2_4_15")
File "D:\anaconda3\envs\neuralforecast\lib\site-packages\cimpy\cimimport.py", line 61, in cim_import
import_result, logger_grouped = _set_attributes(import_result, xml_files, namespace_rdf, base, logger_grouped)
File "D:\anaconda3\envs\neuralforecast\lib\site-packages\cimpy\cimimport.py", line 280, in _set_attributes
if uuid2[0] == "#": # reference
IndexError: string index out of range

@stv0g
Copy link
Contributor

stv0g commented Jul 23, 2024

Can you provide the loaded CGMES files for debugging?

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

2 participants