classification
Title: Exception message when using subprocess.Popen
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, rubys (2)
Priority: normal Keywords

Created on 2007-04-21 10:41 by rubys, last changed 2007-04-21 20:36 by georg.brandl.

Messages (2)
msg31849 - (view) Author: Sam Ruby (rubys) Date: 2007-04-21 10:41
module.py:

om subprocess import Popen, PIPE
pid = Popen(['whoami'],stdout=PIPE,stderr=PIPE)
print pid.communicate()

main.py:

import module

Running module.py directly produces the desired result.  Running main.py, however, produces the following on Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25), i.e., the version of Python that is included in Ubuntu Feisty Fawn:

Exception exceptions.AttributeError: "'NoneType' object has no attribute 'maxint'" in <bound method Popen.__del__ of <subprocess.Popen object at 0xb7d49f0c>> ignored

The same script works in Python 2.4.
msg31850 - (view) Author: Georg Brandl (georg.brandl) Date: 2007-04-21 20:36
Reproduced here; fixed in rev. 54918, 54919 (2.5).
History
Date User Action Args
2007-04-21 10:41:53rubyscreate