Check python version before encoding and test msgpack
Serializer.dumps always returns bytes no need to encode