Skip to content

Conversation

@BOOPESH-foxy
Copy link

@BOOPESH-foxy BOOPESH-foxy commented Sep 9, 2025

Issue #, if available:
Closes #643

Description of changes:

  1. Added type=int to the --count argument in mqtt5_pubsub.py so that it is always parsed as an integer.

  2. Explicitly cast args.input_count to int when assigning message_count.

  3. These changes fix a TypeError: '<=' not supported between instances of 'int' and 'str' that occurs when comparing publish_count to message_count.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xiazhvera
Copy link
Contributor

Thanks for the contribution! We have recently reorganized our samples, , and these changes are now reflected in our latest sample repository. Checkout

optional.add_argument("--count", type=int, metavar="",default=5, dest="input_count",

Closing the PR for now.

@xiazhvera xiazhvera closed this Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError in mqtt5_pubsub.py when using --count argument

2 participants