Coder Social home page Coder Social logo

Comments (9)

s-heppner avatar s-heppner commented on June 24, 2024 1

Looking at your error messages in the last image you provided, it would appear something went wrong in the installation of your basyx-python library.

As you can see:

... is of type <class 'basyx.aas.model.base.ModelReference'> expected <class 'aas.model.base.ModelReference'>

the former is definitely what it is supposed to be.

So, I suspect you installed our basyx library at the level of "aas", when it should have been installed at the directory level above, starting with "basyx.aas".
I'm not sure how you did achieve this, so my suggestion is to completely uninstall basyx and reinstall it using

pip install basyx-python-sdk

which will install v1.0.0, that represents v3.0 of the spec.

What I would also heavily suggest to read into Python virtual environments and using those on a project level basis.

As a last friendly tip, please provide stacktraces and error messages as text in the future, as that is easier to read through than screenshots and can be searched through.

from basyx-python-sdk.

s-heppner avatar s-heppner commented on June 24, 2024

The current state of the write_aas function in aas.adapter.aasx.AASXWriter for version 2.0.1 of the meta-model (Release 0.2.2) does still write seperate AASs in seperate parts.
For questions about the AASX package explorer, please refer to the project: https://github.com/admin-shell-io/aasx-package-explorer, as we are not affiliated.

In the upcoming relase for version 3.0RC02 of the meta-model, the function write_aas() is going to write all the data into one aas-spec (aasx/data.xml or aasx/data.json) file in accordance to the specification, therefore the problem should not arise anymore.

from basyx-python-sdk.

StenGruener avatar StenGruener commented on June 24, 2024

Any idea on the roadmap for "the upcoming release for version 3.0RC02"?

from basyx-python-sdk.

s-heppner avatar s-heppner commented on June 24, 2024

Realistically, it might still need 2-3 months to the release, considering the upcoming examination phase at university and following summer vacations.
But you're very welcome to try out the WIP branch. Most changes should already be present at this point, with the main missing features being the SubmodelElementStructs and SubmodelElementLists.

from basyx-python-sdk.

jorgegomezjumh avatar jorgegomezjumh commented on June 24, 2024

Dear team,

# For adding a second AAS to the package, we can simply call `write_aas()` again.
# Warning: This will create a second XML/JSON part in the AASX Package, which is compliant with the "Details of the
# Asset Administration Shell" standard up to version 2.0.1, but not supported by AASX Package Explorer.

could someone update me on a status of AASX-package-explorer versions of multiple AAS in the AASX package?

I am attempting to write two or more AAS in one AASX file, but I am unable to achieve this by creating another object store. Additionally, I have tried placing both AAS in the same object store, calling 'write_aas()' again, and using a different 'aas_id.' However, both methods yield the same result. I successfully generate an AASX file that opens correctly in AASX Package Explorer, but it only contains the first AAS.

I am still working with version 2, as it is currently impossible for me to transition to version 3. I am facing difficulties in reading the AASX file generated by the aasx-package-explorer.2023-11-17.alpha in basyx-python-sdk-main using AASXReader. Although I attempted to use the AASFix repository, I am unable to read the AASX file of version 3.

from basyx-python-sdk.

s-heppner avatar s-heppner commented on June 24, 2024

I am attempting to write two or more AAS in one AASX file

Can you try to add several AAS Identifiers to the AASXWriter.write_aas() function?

As you can see, the aas_ids parameter actually allows for Iterable:

    def write_aas(self,
                  aas_ids: Union[model.Identifier, Iterable[model.Identifier]],
                  object_store: model.AbstractObjectStore,
                  file_store: "AbstractSupplementaryFileContainer",
                  write_json: bool = False) -> None:

I think it could look something like this, if you place all AAS in the same ObjectStore:

aas_ids = []
for obj in self.objStore:
    if isinstance(obj, AssetAdministrationShell):
        aas_ids.append(obj.id)
writer.write_aas(aas_ids, ...

I am facing difficulties in reading the AASX file generated by the aasx-package-explorer.2023-11-17.alpha

I'm sorry to hear that. Can you provide the error messages? We're not affiliated with the AASX Package explorer, nor the "AASFix" tool, but if it turns out a bug on our end, we'll fix it of course.

from basyx-python-sdk.

jorgegomezjumh avatar jorgegomezjumh commented on June 24, 2024

I have tried to write using this code in v3. It seems that the aasx file is written but when you try to open in AASX Package Explorer this errors appears to me:

image

When I try to use the AASFix another errors appears to me:

image

When using the reader function, I've encountered various errors while attempting to read the AASX file exported by AASX Package Explorer version 3. Even after applying AASFix, the issues persist:

With normal aasx:

image

After AASFix:

image

from basyx-python-sdk.

jorgegomezjumh avatar jorgegomezjumh commented on June 24, 2024

Thank you very much.

The problem was with the files and the version, using this new basyx-python-sdk after using AASFix tool I can read the aasx file exported by the AASX. Package Explorer v3.

from basyx-python-sdk.

s-heppner avatar s-heppner commented on June 24, 2024

Great, I'm happy I could help!
I'll close this issue now, but feel free to reopen it, if you have any further questions.

from basyx-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.