Attempt to fix python 3 test errors on Travis CI