Ahaha I've had the exact same issue recently, fortunately it was only in a few spots. Fair enough.
Interestingly enough, py2 was smart enough to automatically load things in the correct format. Loading a binary file? Get bytes. Loading a text file? Get a string. Py3 has worse functionality now, all for the sake of consistency.
Aaaahg it burns. I basically am going through and first annotating, then upgrading.