Seite 1 von 1

AttributeError: 'module' object has no attribute 'Popen'

Verfasst: Freitag 2. Mai 2008, 16:35
von ivka_sto
Hallo,

Ich hab's geschafft, mir python 2.4 zu organisieren (hatte bis jetzt nur 2.3) , und wollte schon sofort mit dem subprocess rumexperimentieren, doch es geht nicht .. Und zwar .. krieg ich folgende Fehlermeldung:
sh-3.1$ ./subprocess.py
Traceback (most recent call last):
File "./subprocess.py", line 9, in ?
import os, sys, subprocess, signal
File "/home/sto/FktTests/subprocess.py", line 38, in ?
subprocess.Popen('ulimit -c')
AttributeError: 'module' object has no attribute 'Popen'
Wie .. "no attribute 'Popen'" .. verpass ich was? Das war das letzte, was ich erwartet hätte ..


Danke euch im voraus :)

Verfasst: Freitag 2. Mai 2008, 17:05
von Leonidas
Wenn du dein Modul umbenennst, denn du hast dein Modul ``subprocess.py`` genannt und importierst es selbst, dann geht der Fehler weg.

Verfasst: Freitag 2. Mai 2008, 18:08
von mitsuhiko
Und lösch auch noch die "subprocess.pyc" weg, wenn du dein Modul entfernst. Sonst importiert er noch das pyc.