This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek
Date 2012-11-21.08:45:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za>
In-reply-to
Content
The TypeError message when a call to subprocess.Popen() lacks the args argument is incorrect.

For 3.3 and 3.4, the message incorrectly says that a positional argument is required when a keyword argument will do:

>>> import subprocess
>>> subprocess.Popen()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() missing 1 required positional argument: 'args'
>>> subprocess.Popen(args=['test'])
<subprocess.Popen object at 0x10bed4840>

For 3.2 and 2.7, the problem is slightly different.  It says that two arguments are needed and that two have been given:

>>> subprocess.Popen()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (1 given)
>>> subprocess.Popen(shell=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() takes at least 2 arguments (2 given)

I don't know if this issue affects other functions in the standard library, but I suspect it might.
History
Date User Action Args
2012-11-21 08:45:12chris.jerdoneksetrecipients: + chris.jerdonek
2012-11-21 08:45:12chris.jerdoneksetmessageid: <1353487512.93.0.371965893186.issue16520@psf.upfronthosting.co.za>
2012-11-21 08:45:12chris.jerdoneklinkissue16520 messages
2012-11-21 08:45:12chris.jerdonekcreate