fixed outportdata in python