I have a 100 lines, 3 years old python scraper that now bug. Starting lines are:
import urllib, re, os, sys, time # line 1: import modules os.chdir(os.pat
I had this error because I was providing a string of arguments to subprocess.call instead of an array of arguments. To prevent this, use shlex.split:
subprocess.call
shlex.split
import shlex, subprocess command_line = "ls -a" args = shlex.split(command_line) p = subprocess.Popen(args)