Comments (9)
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.
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.
Any idea on the roadmap for "the upcoming release for version 3.0RC02"?
from basyx-python-sdk.
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.
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.
I am attempting to write two or more AAS in one AASX file
Can you try to add several AAS Identifier
s 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.
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:
When I try to use the AASFix another errors appears to me:
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:
After AASFix:
from basyx-python-sdk.
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.
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)
- 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.