Error in pretty.default / .internal(pretty)

Can you share example data and code that leads to this behavior? You can use dput() to share data, and see here for advice on building a reproducible example.