Fix error in EPD when using Python from C