title: Getting TypeError: bad operand type for unary +: 'str' when trying to use subprocess
body: <p>I'm new to python so forgive me if I make any stupid errors. I've been trying to figure out how to pass a command to cmd.exe for about an hour now and have encountered an error every time. Recently I've gotten this error: TypeError: bad operand type for unary +: 'str'. Any help would be appreciated, thanks.</p>
  
  <pre><code>#defines a function to run BDP command with subprocess
  def runcommand(command):
      """Runs command in cmd.exe"""
      import subprocess
      cmd = command
      returned_value = subprocess.call(cmd, shell=True)  
      # returns the exit code in unix
      print('returned value:', returned_value)
  
  #defines a messagebox function to tell user what file to get
  def messagebox(displayinfo):
      """Presents a messagebox telling the user to select a file"""
      from tkinter import messagebox
      messagebox.showinfo(message = displayinfo)
  
  #Sets home to users home path eg C:/users/hsun2
  from pathlib import Path
  home = str(Path.home())
  from tkinter import filedialog
  
  #asks user for location of bfc file
  messagebox('Select the bfc.nii.gz file')
  bfcfile = filedialog.askopenfilename()
  print(bfcfile)
  
  #asks user for location of DTI.nii files
  messagebox('Select your DTI.nii file')
  dtinii = filedialog.askopenfilename()
  
  #asks user for location of bval file
  messagebox('Select bval file')
  bvalfile = filedialog.askopenfilename()
  
  #asks user for bvec file
  messagebox('Select bvec file')
  bvecfile = filedialog.askopenfilename()
  
  output = r"'C:\Program Files\BrainSuite18a\bdp\bdp.exe' " + bfcfile 
  + " --FRT --FRACT --tensor --nii " + dtinii + " -g " + bvalfile 
  + " -b " + bvecfile
  
  #print(output)
  
  #runs bdp command with user input
  #output = runcommand("'C:\Program Files\BrainSuite18a\bdp\bdp.exe' " + bfcfile +
  #" --FRT --FRACT --tensor --nii " + dtinii + " -g " + bvalfile +
  #" -b " + bvecfile)
  </code></pre>
  
  <p>Returns</p>
  
  <pre><code>C:/Users/hsun2/Desktop/localBDP/MTS/testpy/MTS126028/BrainSuite/sagT1MPRAGE_we_normal.bfc.nii.gz
  Traceback (most recent call last):
    File "bdpcommandtest.py", line 44, in &lt;module&gt;
      + " --FRT --FRACT --tensor --nii " + dtinii + " -g " + bvalfile
  TypeError: bad operand type for unary +: 'str'
  
  
  ------------------
  (program exited with code: 1)
  
  Press any key to continue . . .
  </code></pre>