__init__Undefined is not JSON serializable