ignorant / stupid
Lacking knowledge versus lacking intelligence.
Ignorant means lacking knowledge of something. Stupid means slow of mind, or showing a dull judgment. A learned person can be ignorant of a fact. Do not use stupid for a gap in knowledge, or ignorant as a mere insult for dullness.
Examples
Use I was ignorant of the rule.
Use That was a stupid risk.
Avoid I was stupid of the rule.