From: SourceForge.net <no...@so...> - 2008-09-24 18:31:40
|
Bugs item #2126911, was opened at 2008-09-24 20:31 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403045&aid=2126911&group_id=31674 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Thomas Perl (thp4) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot mxlookup unicode strings Initial Comment: I've also sent this to the mailing list, althogh here would probably be a better spot: I'm using formencode, which uses pyDNS to look up mx records to validate e-mail addresses entered on web forms. pyDNS yields a traceback when trying to mxlookup an unicode string. I've also submitted this to formencode, but I'm pretty sure it's a pyDNS problem. formencode bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2126902&group_id=91231&atid=596416 Here's how to reproduce: >>> import DNS.Base >>> DNS.Base.ParseResolvConf() >>> from DNS.lazy import mxlookup >>> mxlookup('gmx.at') [(10, 'mx0.gmx.de'), (10, 'mx0.gmx.net')] >> mxlookup(u'gmx.at') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/var/lib/python-support/python2.4/DNS/lazy.py", line 26, in mxlookup a = Base.DnsRequest(name, qtype = 'mx').req().answers File "/var/lib/python-support/python2.4/DNS/Base.py", line 191, in req m.addQuestion(qname, qtype, Class.IN) File "/var/lib/python-support/python2.4/DNS/Lib.py", line 466, in addQuestion self.addname(qname) File "/var/lib/python-support/python2.4/DNS/Lib.py", line 133, in addname self.buf = self.buf + buf UnicodeDecodeError: 'ascii' codec can't decode byte 0xbb in position 0: ordinal not in range(128) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403045&aid=2126911&group_id=31674 |