{'desc': 'Bad parameter to an ldap routine'}error while trying to add a record from django. Turns out that in the form validation, I had a few fields defined as IntegerFields which means i was passing
('uidNumber', 5001)instead of
('uidNumber', '5001')to python-ldap. Casting to an ascii string works. Unicode doesn't