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

tutorial_aasx.py: Unable to find AASX origin. #185

Closed
JS-Aibel opened this issue Dec 13, 2023 · 5 comments
Closed

tutorial_aasx.py: Unable to find AASX origin. #185

JS-Aibel opened this issue Dec 13, 2023 · 5 comments
Labels
question Further information is requested

Comments

@JS-Aibel
Copy link

JS-Aibel commented Dec 13, 2023

Hi,

I get the following error when trying to open the AASX file MyAASXPackage.aasx created with tutorial_aasx.py in the AASX Package Explorer V3.0 (v2023-09-12). basyx-python-sdk version 1.0.0

In AASX Package Explorer V3.0:
Auto-load main package at application start from C:\xxx\MyAASXPackage.aasx into container
Trying to guess package container for C:\xxx\MyAASXPackage.aasx

Error: When auto-loading main from: C:\xxx\MyAASXPackage.aasx: While opening aasx C:\xxx\AppData\Local\Temp\tmpCA81.aasx from source local file: C:\xxx\MyAASXPackage.aasx buffered to: C:\xxx\tmpCA81.aasx at \AdminShellPackageEnv.cs:line 456 gave: While reading the AASX C:\xxx\AppData\Local\Temp\tmpCA81.aasx at \AdminShellPackageEnv.cs:line 393 gave: Unable to find AASX origin. Aborting! At AasxPackageLogic.PackageCentral.PackageContainerLocalFile.LoadFromSourceAsync(String fullItemLocation, PackCntRuntimeOptions runtimeOptions)

@LukasBenner
Copy link

LukasBenner commented Dec 13, 2023

This issue is most likely related to #666 and #669.

This isn't an issue with the basyx-python-sdk but rather with the AASX Package Explorer and AAS4J.

@s-heppner
Copy link
Contributor

s-heppner commented Dec 14, 2023

Alright, thank you very much, for the referencing @LukasBenner
In that case, I'll close this issue here.

Edit (2024-03-14, @s-heppner):
The issue is now found here: eclipse-aaspe/aaspe#161

@s-heppner s-heppner added the question Further information is requested label Dec 14, 2023
@JS-Aibel
Copy link
Author

The following workaround worked for me. By changing the relationship type before calling the aasx.AASXWriter the AASX-file from the Python Basyx library can be opened in the Package Explorer.

See Python code below.

if package_explorer:
            aasx.RELATIONSHIP_TYPE_AASX_ORIGIN = "http://www.admin-shell.io/aasx/relationships/aasx-origin"
            aasx.RELATIONSHIP_TYPE_AAS_SPEC = "http://www.admin-shell.io/aasx/relationships/aas-spec"
            aasx.RELATIONSHIP_TYPE_AAS_SPEC_SPLIT = "http://www.admin-shell.io/aasx/relationships/aas-spec-split"
            aasx.RELATIONSHIP_TYPE_AAS_SUPL = "http://www.admin-shell.io/aasx/relationships/aas-suppl"
        else:
            aasx.RELATIONSHIP_TYPE_AASX_ORIGIN = "http://admin-shell.io/aasx/relationships/aasx-origin"
            aasx.RELATIONSHIP_TYPE_AAS_SPEC = "http://admin-shell.io/aasx/relationships/aas-spec"
            aasx.RELATIONSHIP_TYPE_AAS_SPEC_SPLIT = "http://admin-shell.io/aasx/relationships/aas-spec-split"
            aasx.RELATIONSHIP_TYPE_AAS_SUPL = "http://admin-shell.io/aasx/relationships/aas-suppl"

        with aasx.AASXWriter(file_path) as writer:

@s-heppner
Copy link
Contributor

s-heppner commented Feb 16, 2024

That's true, but please see also my reply to aasx-package-explorer#666.

The problem is that the Package Explorer creates files that are non-conforming to the specification. We'll have lots of interoperability problems down the line, if implementations decide not to be specification-conformant.

Edit (2024-03-14, @s-heppner):
The issue is now found here: eclipse-aaspe/aaspe#161

@JS-Aibel
Copy link
Author

That's true, but please see also my reply to aasx-package-explorer#666.

The problem is that the Package Explorer creates files that are non-conforming to the specification. We'll have lots of interoperability problems down the line, if implementations decide not to be specification-conformant.

Yes, I agree.
One should use this file for only viewing. See https://github.com/admin-shell-io/temp-aasx-package-explorer/issues/124

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