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

AASConstraintViolation when trying to read the DEXPI template in basyx-python-sdk #79

Open
JS-Aibel opened this issue Sep 17, 2024 · 2 comments

Comments

@JS-Aibel
Copy link

JS-Aibel commented Sep 17, 2024

I am not able to read the template IDTA 02012-1-0_Template_DEXPI.aasx with the basyx-python-sdk aasx.AASXReader.

When reading the file, multiple AASConstraintViolations of type Constraint AASd-123 and Constraint AASd-127 occurs.
I have tested with the Handover Documentation template, and the aasx.AASXReader works fine.

The following changes made the Submodel template readable:

  • Removing the Submodel Elements of type “ReferenceElement” and “RelationshipElement”. This solved the constraint violations.
  • Remove the value of the File elements ModelFile and ModelRepresentation. The files are not attached in the AASX file.

It seems the error is with these elements.

@Rudra-sandeep
Copy link
Collaborator

@JS-Aibel Thank you for raising this we will try to reolve this issue

@JS-Aibel
Copy link
Author

JS-Aibel commented Dec 4, 2024

Hi @Rudra-sandeep,
Any status on updating the DEXPI template to a working example?

To solve the constraint violation for the ReferenceElement in the MappingDirectory, you can follow these steps. Note that I have not investigated the other issues with the template.

  • ValueError: Key(type=FRAGMENT_REFERENCE, value=ProteusXML@ID=ProcessInstrumentationFunction-3) is not preceeded by a key of type File or Blob, but Key(type=SUBMODEL_ELEMENT, value=ModelFile) (Constraint AASd-127)
  • ValueError: The type of the first key of an ExternalReference must be a GenericGloballyIdentifiable: Key(type=SUBMODEL, value=https://epc.org/sm_id/9f236679-e52d-4a52-aa85-dea871a89f9b) (Constraint AASd-122)

Template with Constraint Violation
image

Working Example: Keys Have Been Changed
image

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