token is not an object attribute