cogu / autosar

A set of python modules for working with AUTOSAR XML files
MIT License
353 stars 160 forks source link

MultiLanguageReferrable.__init__() got an unexpected keyword argument 'admin_data' #109

Closed WeWonderMax closed 2 months ago

WeWonderMax commented 2 months ago
              <SHORT-NAME>SwComponentTypes</SHORT-NAME>
              <ELEMENTS>
                <APPLICATION-SW-COMPONENT-TYPE>
                  <SHORT-NAME>swcX</SHORT-NAME>
                  **<ADMIN-DATA>
                    <SDGS>
                      <SDG GID="arxmlgen">
                        <SD GID="property_x">x</SD>
                      </SDG>
                    </SDGS>
                  </ADMIN-DATA>**
                  <PORTS> 

Hello

This element make the reader crash and return None. I just delete it:


                  <SHORT-NAME>SwComponentTypes</SHORT-NAME>
                  <ELEMENTS>
                    <APPLICATION-SW-COMPONENT-TYPE>
                      <SHORT-NAME>swcX</SHORT-NAME>
                      <PORTS>

and everything is fine but it is a hassle for me. Can you make it so the reader ignores it ?

Thanks

cogu commented 2 months ago

@WeWonderMax, thanks for reminding me. I also encountered the issue a while back.

I made a fix but I forgot to add it to git. I just pushed it to latest master.

It simply prevents the crash from happening, it doesn't mean ADMIN-DATA is supported.

WeWonderMax commented 2 months ago

thanks i just needed to ignore it. would you mind creating a minor release ? id rather user a stable version for my docker in prod, rn im based on the latest 0,5,3 tag

cogu commented 2 months ago

Sorry, I can't do that. However, I did increment the module version to v0.5.4a2 in this git commit and pip install knows how to handle these intermediate version numbers.

WeWonderMax commented 2 months ago

nvm i will dig into that thanks for support again