title: TypeError: 'int' object is not subscriptable when I try to pass three arguments in parse.parse_args()
body: <pre><code>ap = argparse.ArgumentParser()
  ap.add_argument("-i", "--image", help="Path to input image", required=True)
  ap.add_argument("-p", "--pivot-point", help="Pivot point coordinates x, y separated by comma (,)", required=True)
  ap.add_argument("-s", "--scale", help="Scale to zoom", type = int, required=True)
  args = vars(ap.parse_args(['image.jpeg', '(144,72)', 3]))
  </code></pre>
  
  <p>Hello,</p>
  
  <p>I am trying to pass an image in the arguments to pivot it and scale it for zooming through argparse.</p>
  
  <p>But I'm getting the following error:</p>
  
  <p>Please, let me know what you're doing wrong.</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-131-c7157827dce9&gt; in &lt;module&gt;()
        3 ap.add_argument("-p", "--pivot-point", help="Pivot point coordinates x, y separated by comma (,)", required=True)
        4 ap.add_argument("-s", "--scale", help="Scale to zoom", type = int, required=True)
  ----&gt; 5 args = vars(ap.parse_args(['image.jpeg', '(144,72)', 3]))
  
  ~/anaconda3/lib/python3.6/argparse.py in parse_args(self, args, namespace)
     1728     # =====================================
     1729     def parse_args(self, args=None, namespace=None):
  -&gt; 1730         args, argv = self.parse_known_args(args, namespace)
     1731         if argv:
     1732             msg = _('unrecognized arguments: %s')
  
  ~/anaconda3/lib/python3.6/argparse.py in parse_known_args(self, args, namespace)
     1760         # parse the arguments and exit if there are any errors
     1761         try:
  -&gt; 1762             namespace, args = self._parse_known_args(args, namespace)
     1763             if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR):
     1764                 args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR))
  
  ~/anaconda3/lib/python3.6/argparse.py in _parse_known_args(self, arg_strings, namespace)
     1801             # and note the index if it was an option
     1802             else:
  -&gt; 1803                 option_tuple = self._parse_optional(arg_string)
     1804                 if option_tuple is None:
     1805                     pattern = 'A'
  
  ~/anaconda3/lib/python3.6/argparse.py in _parse_optional(self, arg_string)
     2087 
     2088         # if it doesn't start with a prefix, it was meant to be positional
  -&gt; 2089         if not arg_string[0] in self.prefix_chars:
     2090             return None
     2091 
  
  TypeError: 'int' object is not subscriptable
  </code></pre>