title: AttributeError: 'module' object has no attribute 'CalledProcessError'
body: <p>I have read through every single question on this topic, and have still been unable to resolve this issue. The most frustrating thing about this is that this is not occurring in one of my scripts, but rather in a 3rd-party library (Naked). Here is <em>my</em> code:</p>
  
  <pre><code>import Naked.toolshed.shell as shell
  #skip a few lines
  respondedSuccessfully = shell.execute_js("notifications.js", token)
  </code></pre>
  
  <p>Here is Naked's <code>execute_js</code> function:</p>
  
  <pre><code>import subprocess
  #skip a few lines
  def execute_js(file_path, arguments=""):
  try:
      if len(arguments) &gt; 0:
          js_command = 'node ' + file_path + " " + arguments
      else:
          js_command = 'node ' + file_path
      return execute(js_command) # return result of execute() of node.js file
  except Exception as e:
      if DEBUG_FLAG:
           sys.stderr.write("Naked Framework Error: unable to run the shell command with the run_js() function (Naked.toolshed.shell.py).")
      raise e
  </code></pre>
  
  <p>So far, so good. Here is the <code>execute()</code> function that it calls:</p>
  
  <pre><code>def execute(command):
  try:
      response = subprocess.call(command, shell=True)
      if response == 0:
          return True
      else:
          return False
  except subprocess.CalledProcessError as cpe:
      try:
          sys.stderr.write(cpe.output)
      except TypeError as te:
          sys.stderr.write(str(cpe.output))
  except Exception as e:
      if DEBUG_FLAG:
          sys.stderr.write("Naked Framework Error: unable to run the shell command with the execute() function (Naked.toolshed.shell.py).")
      raise e
  </code></pre>
  
  <p>When I execute my code, it throws the following error: </p>
  
  <pre><code>AttributeError: 'module' object has no attribute 'CalledProcessError'
  </code></pre>
  
  <p>I do not have a file named "subprocess", and executing those lines one-by-one works. I am stumped. <a href="https://github.com/chrissimpkins/naked" rel="nofollow">Here</a> is the Naked library.</p>
  
  <p>Thank you in advance.</p>