You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just began using docopt-ng. I was creating my interface from scratch (I currently use a functional but spaghetti-like script), and my docstring read something like:
I double checked brackets and there were definitely no unmatched ones. I then double-checked the documentation to make sure I hadn't made a mistake with the syntax, and I couldn't find one.
I had read sometimes docopt (I think the original one?) had issues with pipes, so even though that exact syntax appeared in the documentation, I tried to remove the macos_bundler.py (-h | --help) line and, the error went away; but I couldn't use either -h nor --help, because it kept telling me those optons needed an argument.
Upon closer inspection, I noticed I had missed a space between -h --help and the option description.
So, it seems missing writing something such as
"""Command
Usage:
cli_tool.py (-s | --long)
Options:
-s --long Some description for this option.
"""
Will produce such an error.
Of course, there is an error there, and one the documentation specifically warns against. However, in this particular scenario, the error message was very obscure.
The text was updated successfully, but these errors were encountered:
Thanks for the issue, I agree. I'd be very happy to accept a PR that fixes this, but I'm not motivated enough to dig into the legacy hand-rolled parser to tackle this at the moment myself.
I just began using docopt-ng. I was creating my interface from scratch (I currently use a functional but spaghetti-like script), and my docstring read something like:
But I kept getting the following error and couldn't figure out why.
I double checked brackets and there were definitely no unmatched ones. I then double-checked the documentation to make sure I hadn't made a mistake with the syntax, and I couldn't find one.
I had read sometimes docopt (I think the original one?) had issues with pipes, so even though that exact syntax appeared in the documentation, I tried to remove the
macos_bundler.py (-h | --help)
line and, the error went away; but I couldn't use either -h nor --help, because it kept telling me those optons needed an argument.Upon closer inspection, I noticed I had missed a space between
-h --help
and the option description.So, it seems missing writing something such as
Will produce such an error.
Of course, there is an error there, and one the documentation specifically warns against. However, in this particular scenario, the error message was very obscure.
The text was updated successfully, but these errors were encountered: