fix error message in append

was referencing an unused variable "pymsg"