One of the co-organizers of the conference posted a lengthy comment on my previous article: A Conference called: The Deposition of the Pope. My reply is there. He argues that a Pope can be heretical, based on the opinions of past theologians and scholars. But he ignores the teaching of Vatican I on that question:
1. That apostolic primacy which the Roman Pontiff possesses as successor of Peter, the prince of the apostles, includes also the supreme power of teaching. This Holy See has always maintained this, the constant custom of the Church demonstrates it, and the ecumenical councils, particularly those in which East and West met in the union of faith and charity, have declared it.
2. So the fathers of the fourth Council of Constantinople, following the footsteps of their predecessors, published this solemn profession of faith: The first condition of salvation is to maintain the rule of the true faith. And since that saying of our lord Jesus Christ, You are Peter, and upon this rock I will build my Church , cannot fail of its effect, the words spoken are confirmed by their consequences. For in the Apostolic See the Catholic religion has always been preserved unblemished, and sacred doctrine been held in honor. Since it is our earnest desire to be in no way separated from this faith and doctrine, we hope that we may deserve to remain in that one communion which the Apostolic See preaches, for in it is the whole and true strength of the Christian religion .
What is more, with the approval of the second Council of Lyons, the Greeks made the following profession:
“The Holy Roman Church possesses the supreme and full primacy and principality over the whole Catholic Church. She truly and humbly acknowledges that she received this from the Lord himself in blessed Peter, the prince and chief of the apostles, whose successor the Roman Pontiff is, together with the fullness of power. And since before all others she has the duty of defending the truth of the faith, so if any questions arise concerning the faith, it is by her judgment that they must be settled.” 
Then there is the definition of the Council of Florence:
“The Roman Pontiff is the true vicar of Christ, the head of the whole Church and the father and teacher of all Christians; and to him was committed in blessed Peter, by our lord Jesus Christ, the full power of tending, ruling and governing the whole Church.” 
3. To satisfy this pastoral office, our predecessors strove unwearyingly that the saving teaching of Christ should be spread among all the peoples of the world; and with equal care they made sure that it should be kept pure and uncontaminated wherever it was received.
4. It was for this reason that the bishops of the whole world, sometimes individually, sometimes gathered in synods, according to the long established custom of the Churches and the pattern of ancient usage referred to this Apostolic See those dangers especially which arose in matters concerning the faith. This was to ensure that any damage suffered by the faith should be repaired in that place above all where the faith can know no failing .
5. The Roman pontiffs, too, as the circumstances of the time or the state of affairs suggested, sometimes by summoning ecumenical councils or consulting the opinion of the Churches scattered throughout the world, sometimes by special synods, sometimes by taking advantage of other useful means afforded by divine providence, defined as doctrines to be held those things which, by God’s help, they knew to be in keeping with Sacred Scripture and the apostolic traditions.
6. For the Holy Spirit was promised to the successors of Peter not so that they might, by his revelation, make known some new doctrine, but that, by his assistance, they might religiously guard and faithfully expound the revelation or deposit of faith transmitted by the apostles.
Indeed, their apostolic teaching was embraced by all the venerable fathers and reverenced and followed by all the holy orthodox doctors, for they knew very well that this See of St. Peter always remains unblemished by any error, in accordance with the divine promise of our Lord and Savior to the prince of his disciples: I have prayed for you that your faith may not fail; and when you have turned again, strengthen your brethren .
7. This gift of truth and never-failing faith was therefore divinely conferred on Peter and his successors in this See so that they might discharge their exalted office for the salvation of all, and so that the whole flock of Christ might be kept away by them from the poisonous food of error and be nourished with the sustenance of heavenly doctrine. Thus the tendency to schism is removed and the whole Church is preserved in unity, and, resting on its foundation, can stand firm against the gates of hell.