This is invalid syntax on Python 3. Use `except SocketTimeout as err:`.