Comments (2)
Thanks for the detailed answer. I will forward this issue back to there!
from basyx-python-sdk.
You seem to experience three distinct issues:
-
Here the XML parser is trying to instantiate a
KeyError: aas:mimeType on line 505 has no text! -> Failed to construct aas:file on line 495 using construct_submodel_element!
SubmodelElement
of typeFile
. I extracted the respective data from the AASX package SMT_pure_ZVEI_Digital_Nameplate_V10.aasx:The<aas:submodelElement> <aas:file> <aas:idShort>MarkingFile</aas:idShort> <aas:category>VARIABLE</aas:category> <aas:kind>Template</aas:kind> <aas:semanticId> <aas:keys> <aas:key type="ConceptDescription" local="true" idType="IRI">https://admin-shell.io/zvei/nameplate/1/0/Nameplate/Markings/Marking/MarkingFile</aas:key> </aas:keys> </aas:semanticId> <aas:qualifier /> <aas:mimeType /> <aas:value /> </aas:file> </aas:submodelElement>
File
submodel element is specified at the bottom of page 67 (section 4.7.12) of the DotAAS specification. There it specifies the cardinality of themimeType
property as 1, meaning that this property has to be present and is not optional. In the excerpt above you see that<aas:mimeType />
is just an empty tag, so the mime type isn't given for thisFile
element, which is invalid. Because of this invalidity, theFile
element cannot be instantiated using this SDK.
-
The AASX package contains a lot of
ValueError: A revision requires a version. This means, if there is no version there is no revision neither. -> Failed to construct aas:administration on line 590 using construct_administrative_information!
AdministrativeInformation
objects which specify therevision
, but not theversion
. Here is an excerpt from SMT_pure_ZVEI_Digital_Nameplate_V10.aasx:If you have a look at the DotAAS specification (v2.0.1) on the top of page 54 (section 4.7.2.4) you can see that the<aas:administration> <aas:version /> <aas:revision>1</aas:revision> </aas:administration>
revision
attribute ofAdministrativeInformation
has a constraint, stating that if no version is given, there can't be a revision. Thus the AASX package is invalid in this regard.
Anyways, because theAdministrativeInformation
is an optional attribute, the parent objects such asAssetAdministrationShell
,Submodel
,ConceptDescription
orAsset
are still parsed, just without theiradministration
attribute.
-
The AASX package contains two
IEC61360ConceptDescription[Identifier(IRI=https://admin-shell.io/zvei/nameplate/1/0/Nameplate)] has a duplicate identifier already parsed in the document! skipping it...
Identifiable
objects with the same Identifier:<aas:submodel> <aas:idShort>Nameplate</aas:idShort> <aas:category>VARIABLE</aas:category> <aas:identification idType="IRI">https://admin-shell.io/zvei/nameplate/1/0/Nameplate</aas:identification> [...] </aas:submodel>
As you can see, both, the<aas:conceptDescription> <aas:idShort /> <aas:identification idType="IRI">https://admin-shell.io/zvei/nameplate/1/0/Nameplate</aas:identification> [...] </aas:conceptDescription>
Submodel
and theConceptDescription
, use the IRIhttps://admin-shell.io/zvei/nameplate/1/0/Nameplate
as their identifier.
The DotAAS specification says on page 54 (section 4.7.2.1) thatidentification
attribute of anIdentifiable
object must be a globally unique identifier. Thus, if two objects thave the same identifier, it isn't globally unique anymore, making it invalid.
If you have the time, please forward these issue to https://github.com/admin-shell-io/submodel-templates/issues so the AASX package can get fixed. Thanks!
from basyx-python-sdk.
Related Issues (20)
- Misleading error message in case of non-existent file HOT 1
- Update `Development Status` classifier in `setup.py` HOT 1
- Integer value is not accepted for Double value type HOT 4
- aasx: Add failsafe for writing and reading AASX files HOT 1
- Convert primitive types into string when creating a property of type string HOT 2
- Logo: Change logo to the original version
- AAS with submodel/type: "ExternalReference" not supported HOT 7
- Reading published AAS Submodel Templates from aasx HOT 11
- Unable to add SubmodelElementCollection to SubmodelElementList HOT 9
- Concept Description missing from AAS (AASX-file) when External Reference is used. HOT 5
- Remove schema files from repository HOT 1
- Attaching files with spaces in the file name causes a ValueError when writing the AASX HOT 6
- Missing 'aasx-spec' document in AASX HOT 9
- RELATIONSHIP_TYPE_AASX_ORIGIN strings do not match those in the submodel templates from IDTA HOT 2
- model: Allow empty strings in SubmodelElement.value HOT 1
- How to generate unique IDs? HOT 4
- Does a property lose its reference to a concept description when reading an AASX file? HOT 6
- Log a warning if no AAS files are read within an AASX package
- aas:adapter Unable to read aasx file, because of dead links HOT 10
- convert json into aasx fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basyx-python-sdk.