[InterMine Dev] compare_templates_for_releases.py

Alex Kalderimis alex at intermine.org
Wed Mar 7 15:15:41 GMT 2012


That error suggest that you are unable to connect to an SMTP server on 
localhost. It would be fantastic if you could have a brief look at the 
documentation for this module 
(http://docs.python.org/library/smtplib.html) and come up with a 
minimal working/failing example, along the lines of the following:

  from smtplib import SMTP
  smtp = SMTP('localhost')
  # ... fails

  args = ['host', 1234] # magical collection of better args...
  smtp = SMTP(*args)
  # .. works!

Either this seems to be primarily a local configuration issue, or we 
could do better at detecting these issues, or providing options to 
accomodate them. I would start by checking the ports that you have 
available, and whether sendmail is set up on localhost.

All best

Alex

On Tue 06 Mar 2012 21:46:35 GMT, Kalpana Karra wrote:
> I get this error for the python version after the templates run fine..I have whatever python comes default on mac os X
>
> Sending email to kkarra at stanford.edu
> Traceback (most recent call last):
>   File "compare_templates_for_releases.py", line 239, in <module>
>     compare_templates(*args)
>   File "compare_templates_for_releases.py", line 62, in compare_templates
>     report_results(results, send_to, send_from)
>   File "compare_templates_for_releases.py", line 117, in report_results
>     smtp = smtplib.SMTP('localhost')
>   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 239, in __init__
>     (code, msg) = self.connect(host, port)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 295, in connect
>     self.sock = self._get_socket(host, port, self.timeout)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/smtplib.py", line 273, in _get_socket
>     return socket.create_connection((port, host), timeout)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 512, in create_connection
>     raise error, msg
> error: [Errno 61] Connection refused
>
> Same issue with Perl version, the script is not able to send mail. But, sendmail is working fine..if I do this..
>
> echo "Hello" | mail -s "Test" kkarra at stanford.edu
>
> Thanks,
> -Kalpana
>
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev



More information about the dev mailing list