admin-shell-io / aas-test-engines

Official test tooling for the Asset Administration Shell
https://certification.admin-shell-io.com
Apache License 2.0
5 stars 2 forks source link

BadZipFile issue #10

Closed barthchristian closed 3 months ago

barthchristian commented 3 months ago

I'm trying to run the aas_test_engine as a minimal example to test an aasx file (metamodel v3) previously created and stored with the package explorer. I get the "File is not a zip file" error, despite the file being a zip file (but not called .zip) :). The setup is a windows computer, running anaconda3 as python environment. Anyone has an idea how to fix this? image

otto-ifak commented 3 months ago

Thanks for reporting this. Actually, the README is wrong, here, it should be:

with open('aas.aasx', 'rb') as f:
    result = file.check_aasx_file(f)
# result.ok() == True

(Note the extra 'rb')

The command line tool did this wrong, too, has been fixed with aa8f0489e8fc83c3af608d9bf0102b310a9e3a2d.

Does this resolve your issue?

barthchristian commented 3 months ago

Hi thanks for the reply, this indeed fixes my issue!