You're treating it like an iterable:
msg, data = ..
This will try to loop over the object and assigning the items to msg
and data
. Since the object returned is not an iterable, you have the error.
The subprocess.Popen
constructor returns a Popen
object. Maybe you want to use Popen.communicate
? It does return a tuple, stdoutdata, stderrdata
.