fix encoding cycle if all encoders fail

we need to raise an exception if all encoders fail