eclipse-basyx / basyx-python-sdk

MIT License
60 stars 28 forks source link

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

Closed Alphacharge closed 8 months ago

Alphacharge commented 8 months ago

Hey, i traced back my issue, that i can't read aasx files currently, to the compliance PR #245 . The links in https://github.com/eclipse-basyx/basyx-python-sdk/blob/d7a2283449fb1579b1274ddf9c18f4c8f4f07f29/basyx/aas/adapter/aasx.py#L42-L45 are dead and just refer all to https://industrialdigitaltwin.org/en/ https://github.com/eclipse-basyx/basyx-python-sdk/blob/d7a2283449fb1579b1274ddf9c18f4c8f4f07f29/basyx/aas/adapter/aasx.py#L141-L147 is failing So when is the transformation finished?

jkhsjdhjs commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

<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 commented 8 months ago

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

jkhsjdhjs commented 8 months ago

/cc @s-heppner

s-heppner commented 8 months ago

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.