[New-bugs-announce] [issue25045] smtplib throws exception TypeError: readline()

Philippe Lambotte report at bugs.python.org
Wed Sep 9 17:39:19 CEST 2015


New submission from Philippe Lambotte:

smtplib  smtpserver.ehlo() will throw exception.
The error message : 
Traceback (most recent call last):
  File "snippet.email.sendmail.py", line 34, in <module>
    smtpserver.ehlo()
  File "/usr/lib/python3.2/smtplib.py", line 421, in ehlo
    (code, msg) = self.getreply()
  File "/usr/lib/python3.2/smtplib.py", line 367, in getreply
    line = self.file.readline(_MAXLINE + 1)
TypeError: readline() takes exactly 1 positional argument (2 given)

smtplib works with python 2.7, but not  with 3.2

If I remove the passed parameter, it works in 3.2 :
     line = self.file.readline()

----------
components: email
messages: 250317
nosy: barry, phlambotte, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib throws exception TypeError: readline()
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25045>
_______________________________________


More information about the New-bugs-announce mailing list