The new error message now hints that the most likely issue is a circular import. Thanks to trac user elena for the report and to bpeschier for the original patch.