Fixed error message regex for py3