Closed wesley-petit closed 1 year ago
For one of my projects, I'm using TilesetTiler's parse_command_line function to parse 3D Tiles, and I'm also using non-py3DTilers arguments to set options in my application. However, I get an error message from py3DTilers TilesetTiler:
parse_command_line
unrecognized arguments : --start_date 42
This is because, by default, TilesetTiler uses parse_args() which will create an error message when an unknown command appears: a https://stackoverflow.com/questions/12818146/python-argparse-ignore-unrecognised-arguments
parse_args()
You can create reproduces the error with :
tiler = TilesetTiler() args = tiler.parser.parse_args(['--foo', '42'])
We can easily fix this issue using parse_known_args function.
parse_known_args
For one of my projects, I'm using TilesetTiler's
parse_command_line
function to parse 3D Tiles, and I'm also using non-py3DTilers arguments to set options in my application. However, I get an error message from py3DTilers TilesetTiler:This is because, by default, TilesetTiler uses
parse_args()
which will create an error message when an unknown command appears: a https://stackoverflow.com/questions/12818146/python-argparse-ignore-unrecognised-argumentsYou can create reproduces the error with :
We can easily fix this issue using
parse_known_args
function.