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

aas:adapter Unable to read aasx file, because of dead links #248

Closed
Alphacharge opened this issue Mar 7, 2024 · 10 comments
Closed

aas:adapter Unable to read aasx file, because of dead links #248

Alphacharge opened this issue Mar 7, 2024 · 10 comments
Labels
question Further information is requested

Comments

@Alphacharge
Copy link

Hey, i traced back my issue, that i can't read aasx files currently, to the compliance PR #245 .
The links in

RELATIONSHIP_TYPE_AASX_ORIGIN = "http://admin-shell.io/aasx/relationships/aasx-origin"
RELATIONSHIP_TYPE_AAS_SPEC = "http://admin-shell.io/aasx/relationships/aas-spec"
RELATIONSHIP_TYPE_AAS_SPEC_SPLIT = "http://admin-shell.io/aasx/relationships/aas-spec-split"
RELATIONSHIP_TYPE_AAS_SUPL = "http://admin-shell.io/aasx/relationships/aas-suppl"
are dead and just refer all to https://industrialdigitaltwin.org/en/
# Find AASX-Origin part
core_rels = self.reader.get_related_parts_by_type()
try:
aasx_origin_part = core_rels[RELATIONSHIP_TYPE_AASX_ORIGIN][0]
except IndexError as e:
raise ValueError("Not a valid AASX file: aasx-origin Relationship is missing.") from e
is failing
So when is the transformation finished?

@jkhsjdhjs
Copy link
Contributor

Your issue is entirely unrelated to #245. The relationship types are IRIs not links, they're not meant to lead you to a meaningful website: https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier
Looking at the excerpt of aasx.py you linked, you're probably experiencing the same issue as in #185

@Alphacharge
Copy link
Author

thx for the fast reply. Okay, so you think the issue comes from the AAS Designer? The file got created with it. #185 got created with Package Explorer.

@jkhsjdhjs
Copy link
Contributor

Yeah, it's a pretty common issue, as the relationship types changed with DotAAS V3 (the www. was removed). I don't know the AAS Designer, so I don't know whether it even aims to be compatible with DotAAS V3. If it does, it's definitely an issue with it. If not, and it's still compatible with DotAAS V2, then you can try release 0.2.2 or the v2.0.1 branch of the basyx-python-sdk, which are compatible with V2.

@Alphacharge
Copy link
Author

In the Dashboard it shows V3.
But if i test the file i think it's still V2:
xxd test.aasx | grep www
00003fe0: 7474 703a 2f2f 7777 772e 6164 6d69 6e2d ttp://www.admin-
000042c0: 2f77 7777 2e61 646d 696e 2d73 6865 6c6c /www.admin-shell
thx for the help. I will close this issue again.

@jkhsjdhjs
Copy link
Contributor

BTW: AASX is just ZIP with a different file extension (https://en.wikipedia.org/wiki/Open_Packaging_Conventions), so instead of viewing the file with xxd, you can just use your standard archive viewer.

Also: Because many SDKs and tools didn't update their OPC relationship types, the www. is not a good indicator of whether a file is for version 2 or 3. A better indicator are the XML namespace declarations of the XML file inside the AASX archive, as they seem to have been updated correctly in most tools and SDKs. The namespaces are https://admin-shell.io/aas/3/0 for version 3 and http://www.admin-shell.io/aas/2/0 for version 2.

@Alphacharge
Copy link
Author

thank you very much for your help.
<environment xmlns="https://admin-shell.io/aas/3/0">
i removed all www., now i have other issues. I will use an other easier file for testing.

@jkhsjdhjs
Copy link
Contributor

<environment xmlns="https://admin-shell.io/aas/3/0">

Alright, so the AAS Designer definitely aims to be compatible with version 3. In this case, it would be good if you could report this issue to the AAS Designer, so they can fix the relationship types.

i removed all www., now i have other issues.

Feel free to create a new issue if you think these are issues with the basyx-python-sdk

@Alphacharge
Copy link
Author

I have a last question: Why are there no discussions on all repos to get help or contribute in an easier way?

@jkhsjdhjs
Copy link
Contributor

/cc @s-heppner

@s-heppner
Copy link
Contributor

Good suggestion, @Alphacharge!

Currently, discussions are not available to us in the project settings.
I'll ping the main project Eclipse BaSyx admins to see, if we can enable them.

@s-heppner s-heppner added the question Further information is requested label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants