For anyone getting a similar error, I fixed mine using the byte_order
parameter.
byte_order='native'
fixed my problem, but the options are (‘native’, ‘=’, ‘little’, ‘<’, ‘BIG’, ‘>’)
(I'm using scypi 1.7.0).
Docs: https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html