I highly suggest the reading on archives or the book "The True Story of the Council" by Cardinal Manning. He answers questions on this issue and a book on Temporary Powers. Cardinal Manning states how the nomination of a Pope is infallible. But question is, can a validly nominated Pope go wrong in his pontificate and the answer is yes.
IMO for example: Pope Pius XI when asked or commanded by God through His Mother, said the hour is now to consecrate Russia, 1929, Tuy, Spain. This message given to sister Lucia. We all know he did not do it. A command!! A command of God, and he didn't do it.