IBM-Blockchain / ansible-collection

Ansible collection for building Hyperledger Fabric networks
Apache License 2.0
43 stars 38 forks source link

TypeError between str and int with '<' comparison when using peer 2.5.0 and fabric-ca-server 1.5.6 in build_network.sh #648

Open silliman opened 1 year ago

silliman commented 1 year ago

When I use the fabric 2.5.0 binaries and the fabric-ca-* binaries in my path when running the build_network.sh tutorial, I get a Python TypeError, cannot use '<' between str and int from distutils/version.py. I suspect that this may be due to Fabric 2.5 puts a 'v' in front of the version prefix (as does fabric-ca-server 1.5.6)

E.g., peer version returns

Version: 2.4.4

for 2.4.4

but it returns

Version: v2.5.0

for 2.5.0

Similarly, you get

Version: 1.5.5

for fabric-ca-server 1.5.5

and

Version: v1.5.6

for fabric-ca-server 1.5.6

So, if I have peer 2.4.4 and fabric-ca-server 1.5.5 in my path, I can run the tutorial scripts, but if I have peer 2.5.0 and fabric-ca-server 1.5.6 in my path, they fail with the type error between str and int.

Note: I can run the playbook to install the operator and console with the peer 2.5.0 and fabric-ca-server 1.5.6.

I'm not certain that this added 'v' is the source of the problem, I just suspect it. More details available on request.

maghbari commented 1 year ago

Exactly, I am having similar issue.. I am using fabric 2.5 binaries and fabric-ca 1.5.6 and when the playbook call creating certificate authority I got this error

TypeError: '<' not supported between instances of 'str' and 'int'

Did you find out what's the issue?