If zodbupdate -convert=py3 is called from Python 2, the "widcode"s remain bytes; if called from Python 3, they may be (likely wrongly) converted to str or remain bytes. The code expects str and raises an exception if it encounters bytes.
Likely the best approach is to reindex all ZCTextIndexes after a Python 2 -> Python 3 conversion.