Invalid Value May Not Be Specified When Value Is Not Empty In Python