fix python3 external communication