rabbitmqadmin list queues name message_stats.publish_details.rate report 'float' object has no attribute 'encode'

145 views Asked by At

when I run the command in the rabbitmq 3.6.10, "rabbitmqadmin list queues name consumers message_stats.publish_details.rate"

echo AttributeError: 'float' object has no attribute 'encode' in the console.

1

There are 1 answers

0
JesseChen On

just modify the python script file "rabbitmqadmin" (422 line of code):

def maybe_utf8(s):
     if isinstance(s, int):
         # s can be also an int for ex messages count
        return str(s)
     if isinstance(s, float):
        # s can be also a float for message rate
        return str(s)
     if sys.version_info[0] == 3:
        # It will have an encoding, which Python will respect
        return s