Thank you for your answers. Indeed, as indicated by John Palmieri, the error seems to happen due to the new line m.update(bytearray(line,'utf8')). If replaced with m.update(line) (i.e., the old behavior), the problem is fixed. Thank you for reporting the issue on trac.sagemath.org.