(An Unofficial) Python Reference Wiki

"clearly marked experimental"

UnboundLocalError

Raised when a reference is made to a local variable in a function or method, but no value has been bound to that variable. This is a subclass of NameError. New in version 2.0.