Did you take context into account?
Considered from a moral and juridical standpoint, the guilt requisite for the incurring of excommunication implies, first, the full use of reason; second sufficient moral liberty; finally, a knowledge of the law and even of the penalty. Where such knowledge is lacking, there is no contumacy, i.e. no contempt of ecclesiastical law, the essence of which consists in performing an action known to be forbidden, and forbidden under a certain penalty. The prohibition and the penalty are known either through the text of the law itself, which is equivalent to a juridical warning, or through admonitions or proclamations issued expressly by the ecclesiastical judge. Hence arise various extenuating reasons (causæ excusantes), based on lack of guilt, which prevent the incurring of excommunication:
(1) Lack of the full use of reason. This excuses children, also those who have not attained the age of puberty, and, a fortiori, the demented. Inadvertence, however, is not presumed; while it may affect moral responsibility and excommunication in foro externo, it is no obstacle to juridical guilt.
(2) Lack of liberty resulting from grave fear. Such fear impairs the freedom of the will, and while it exists contumacy or rebellion against the laws of the Church cannot be presumed. Evidently, a proper estimation of this extenuating reason depends on the circumstances of each particular case and will be more readily accepted as an excuse for violating a positive law than in palliation of an offence against the natural or Divine law.
(3) Ignorance. The general principle is, that whosoever is ignorant of the law is not responsible for transgressing it; and whosoever is ignorant of the penalty does not incur it. But the application of this principle is often complicated and delicate. The following considerations, generally admitted, may serve as a guide:
(a) All ignorance, both of law and of fact, is excusatory.
(b) The ignorance known as “invincible” always excuses; it may also be called inculpable or probable ignorance.
© There are two kinds of culpable ignorance, one known as crassa or supina, i.e. gross, improbable ignorance, and supposing a grievously guilty neglect in regard to knowledge of the law ; the other is affected ignorance, really a deliberate ignorance of the law through fear of incurring its penalty.
(d) Ordinarily, gross ignorance does not excuse from punishment. But it does so only when the law formally exacts a positive knowledge of the prohibition. The laws that inflict excommunication contain as a rule two kinds of expressions. Sometimes the offence only is mentioned, e.g. "all apostates, heretics’s, etc., or “those who absolve their accomplices in a sin against chastity” (Const. “Apost. Sedis”, I, 1, 10). Sometimes causes are inserted that exact, as a necessary condition, the knowledge or effrontery of the culprit, e.g., “those who knowingly read books” condemned under pain of excommunication, “regulars who have the audacity to administer the Viaticum without permission of the parish priest” (Const. “Apost. Sedis”, I, 2; II, 14). Gross ignorance excuses in the second case but not in the first.
(e) For many authors, affected ignorance is equivalent to a knowledge of the law, since by it some avoid enlightening themselves concerning a dreaded penalty; these authors conclude that such ignorance never excuses. Other canonists consider that this penal law is to be strictly interpreted; when, therefore, it positively exacts knowledge on the part of the culprit, he is excused even by affected ignorance. As, in practice, it is not always easy to establish the shades of difference, it will suffice to remark that in a case of occult excommunication the culprit has the right to judge himself and to be judged by his confessor according to the exact truth, whereas, in the forum externum the judge decides according to presumptions and proofs. Consequently, in the tribunal of conscience he who is reasonably persuaded of his innocence cannot be compelled to treat himself as excommunicated and to seek absolution; this conviction, however, must be prudently established.