[mod_python] ldap woes

Joshua Ginsberg listspam at flowtheory.net
Fri Aug 11 10:24:23 EDT 2006


It sounds like your error message is encoded in a different character
set than you're returning to the client, and that your error message
can't be re-encoded in the character set you're returning to the client.

-jag

On Thu, 2006-08-10 at 22:35 -0700, mauchi wrote:
> I am able to authenticate users under MoinMoin with python ldap as well
> as command line on the same server using the following mechanism:
> 
> ##
> 
> import ldap
> 
> ldapServer = '192.168.1.100'
> ldapConfig = 'uid=%s,ou=people,dc=assembleco,dc=x'
> 
> l = ldap.open(ldapServer)
> 
> if password == "":
> 	password = "wrong"
> 
> try:
> 	l.simple_bind_s(ldapConfig % ('%s'%username), ('%s'%password))
> 	
> except ldap.LDAPError, e:
> 	print e
> 
> #
> 
> Under mod_python, it fails with the following error:
> 
> {'desc': 'Encoding error'}
> 
> 
> any ideas as to why it would act this way just with mod_python? 
> 
> Thanks!
> 
> 



More information about the Mod_python mailing list