Python 2 can raise a valueerror here