Many people confuse the word infallability with the word impeccable.
The Pope is human, he is not sinless, thus infallibility is not a characteristic of the popes personal conduct or his private views.
But on pronouncements of faith and morals with the Magisterium of the Church, he is infallible.
“Even when Vatican I (1869-1870) defined papal infallibility, it did so in terms of the Church. Vatican I stated that when the pope defines a dogma of faith (often described as speaking “ex cathedra”from the chair), he is gifted by the Holy Spirit with that infallibility with which God wished the Church to be endowed in defining a doctrine of faith or morals.”