smtplib problem with newly rebuilt Debian/lenny system

cassiope fpm at u.washington.edu
Mon Mar 30 11:31:32 EDT 2009


On Mar 27, 11:29 am, a... at pythoncraft.com (Aahz) wrote:
> [posted & e-mailed, please respond to newsgroup]
>
> In article <d37a66e9-55c2-437c-b613-009a62f71... at d2g2000pra.googlegroups.com>,
>
>
>
> cassiope  <f... at u.washington.edu> wrote:
>
> >In attempting to diagnose the cause, I tried directly executing the
> >lines inside the python2.5 interpreter:
>
> >        import  smtplib
> >        s= smtplib.SMTP('localhost')
>
> >but the second line causes  a traceback:
>
> >        File "<stdin>", line 1, in <module>
> >        File "/usr/lib/python2.5/smtplib.py", line 244, in __init__
> >            (code, msg) = self.connect(host, port)
> >        File "/usr/lib/python2.5/smtplib.py", line 310, in connect
> >            raise socket.error, msg
> >        socket.error: (97, 'Address family not supported by protocol')
>
> >This is with exim4 and python2.5 on a newly installed lenny system.
> >No error messages appear in /var/log or /var/log/exim4 directories.
>
> What happens if you
> telnet localhost 25
>
> This looks like a network setup issue.
> --
> Aahz (a... at pythoncraft.com)           <*>        http://www.pythoncraft.com/
>
> "At Resolver we've found it useful to short-circuit any doubt and just
> refer to comments in code as 'lies'. :-)"
> --Michael Foord paraphrases Christian Muirhead on python-dev, 2009-3-22

Yes, that's what it was.  Exim4 setup was bungled, so wasn't accepting
localhost
connections.  Fixing that resolved the "python" error.



More information about the Python-list mailing list