title: python click app is failing with indication of "missing argument" but cannot locate the issue
body: <p>I am creating an app with <code>Click</code> in python 3.6. I seem to have an error that I cannot find. I have posted my code below.</p>
  
  <p>The problem is that when I type:</p>
  
  <pre><code>python clickapp.py --help
  </code></pre>
  
  <p>all is good. But when I type</p>
  
  <pre><code>python clickapp.py simplerequest --help
  </code></pre>
  
  <p>I get an error indicating that I am missing the argument "directory", but there is no traceback to indicate the source of the error. The exact output is:</p>
  
  <pre><code>Usage: clickapp.py [OPTIONS] STARTDATE ENDDATE DIRECTORY COMMAND [ARGS]...
  
  Error: Missing argument "directory".
  </code></pre>
  
  <p>Here is the code that I used. This is a minimal example with filename <code>clickapp.py</code>.</p>
  
  <pre><code>import click
  
  @click.group()
  @click.argument('startdate')
  @click.argument('enddate')
  @click.argument('directory', type=click.Path())
  @click.pass_context
  def cli(ctx,
          startdate,
          enddate,
          directory):
  
      ctx.obj['directory'] = directory 
      ctx.obj['startdate'] = startdate
      ctx.obj['enddate'] = enddate
  
  
  @click.command()
  @click.argument('arg1', type=str)
  @click.argument('arg2', type=click.Path(exists=True))
  @click.argument('arg3', type=int)
  @click.pass_context
  def SimpleRequest(ctx,
                    arg1,
                    arg2,
                    arg3):
  
      """Simple request processor"""
  
      ctx.obj['arg1'] = arg1
      ctx.obj['arg2'] = arg2
      ctx.obj['arg3'] = arg3
  
  cli.add_command(SimpleRequest)
  
  if __name__ == '__main__':
      cli(obj={})
  </code></pre>
  
  <p>Can anyone see the source of the error?</p>
  
  <p>I tried a few things:</p>
  
  <ol>
  <li><p>I removed the <code>type=click.Path(exists=True)</code> in <code>arg2</code> to see if that might be causing the problem. But that did not change anything. </p></li>
  <li><p>I also tried to remove some validation logic around inserting the variables into the <code>ctx</code> dictionary, but that did not help either. </p></li>
  </ol>