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
UseI was ignorant of the rule.
UseThat was a stupid risk.
AvoidI was stupid of the rule.