IBM / lmctl

Cloud Pak for Network Automation (CP4NA) (previously ALM/TNCO) command line tool
Apache License 2.0
4 stars 19 forks source link

lmctl 3.1 doesn't work on Python 3.6.8 #140

Open Teju-chitara opened 2 years ago

Teju-chitara commented 2 years ago

[ec2-user@ip-172-31-30-164 cnf_amf_nokia]$ lmctl project push default

Push - cnf_amf_nokia at ./

--> Validate Sources Validating assembly descriptor for cnf_amf_nokia Checking descriptor found at: ./Descriptor/assembly.yml

Validating service behaviour for cnf_amf_nokia No service behaviour found at: ./Behaviour

[amf] --> Validate Sources [amf] Checking descriptor found at: ./Contains/amf/Definitions/lm/resource.yaml [amf] Definitions directory found at: ./Contains/amf/Definitions [amf] CP4NA orchestration definitions directory found at: ./Contains/amf/Definitions/lm [amf] Resource descriptor found at: ./Contains/amf/Definitions/lm/resource.yaml [amf] Lifecycle directory found at: ./Contains/amf/Lifecycle

--> Stage Sources Staging assembly descriptor for cnf_amf_nokia at ./Descriptor/assembly.yml

Staging service behaviour for cnf_amf_nokia at ./Behaviour Skipping - nothing to compile at ./Behaviour

[amf] --> Stage Sources [amf] Staging Resource descriptor for amf-cnf_amf_nokia at ./Contains/amf/Definitions/lm/resource.yaml [amf] Staging directory ./Contains/amf/Lifecycle

--> Compile Package Compiling descriptor(s) for: cnf_amf_nokia Skipping - nothing to compile at ./_lmctl/staging/Behaviour

[amf] --> Compile Package [amf] Creating Resource package for amf: amf-cnf_amf_nokia.zip [amf] Adding directory to Resource package: Definitions [amf] Adding directory to Resource package: Lifecycle

--> Finalise Package Error: dump_all() got an unexpected keyword argument 'sort_keys' [ec2-user@ip-172-31-30-164 cnf_amf_nokia]$ lmctl --version lmctl, version 3.1.0 [ec2-user@ip-172-31-30-164 cnf_amf_nokia]$ python3 --version Python 3.6.8

dvaccarosenna commented 2 years ago

Hi @Teju-chitara, thanks for the details.

Could you verify the version of PyYAML installed on your system?

pip show pyyaml
Teju-chitara commented 2 years ago

Below is the output i am getting

[ec2-user@ip-172-31-30-164 ~]$ pip3 show pyyaml Name: PyYAML Version: 3.12 Summary: YAML parser and emitter for Python Home-page: http://pyyaml.org/wiki/PyYAML Author: Kirill Simonov Author-email: xi@resolvent.net License: MIT Location: /usr/lib64/python3.6/site-packages Requires: [ec2-user@ip-172-31-30-164 ~]$

dvaccarosenna commented 2 years ago

Ok, that's interesting. Lmctl requires PyYAML>=5.3.0,<6.0 so I think if you upgrade PyYAML to a 5.x version it might resolve this?

pip install pyyaml -U

or

pip install pyyaml==5.4.1