I think the problem is solved:
I have to change '>>> c = MQTTClient("client", "10.0.0.32")
With '>>> c = MQTTClient(b"client", b"10.0.0.32")
Well, that might make a difference for CPython, but not for MicroPython, we have relaxed rules regarding str vs bytes, and in many contexts where bytes are required, str can be passed (assumed to have utf-8 encoding).
As https://github.com/micropython/micropython-lib/blob/v1.8.4/umqtt.simple/umqtt/simple.py#L84, the problem is that your server doesn't return valid MQTT response. So, you would need to diagnose your server why it does so (it may be a network problem too, etc.)
Likely, in that case, the
respobject is shorter than the two bytes.The library is simple, it does not handle all possible error, so you may need to wrap it in additional error handling,
also to deal with external glitches in networks , DNS and other interferences.