CodeType is different across versions in python, python2 encodes bytes as a string type, but in Python3 it's bytes. Also, in python2 there won't be a kwonlyargcount in python2.
These kind of mismatches are causing issues wile disassembling the code objects.
Solution for this is, creating a custom CodeType which can accommodate any cross versional changes without complaints.