{"record":{"id":"a5ffcfe204f74bd3","repo":"apache/beam","slug":"unknown-command-s-possible-values-are-s","errorCode":null,"errorMessage":"Unknown command %s possible values are %s","messagePattern":"Unknown command (.+?) possible values are (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/utils/transform_service_launcher.py","lineNumber":280,"sourceCode":"  project_name = (\n      TransformServiceLauncher._DEFAULT_PROJECT_NAME\n      if known_args.project_name is None else known_args.project_name)\n  logging.info(\n      'Starting the Beam Transform Service at %s.' % (\n          'the default port' if known_args.port < 0 else\n          (' port ' + str(known_args.port))))\n  launcher = TransformServiceLauncher(\n      project_name, known_args.port, known_args.beam_version)\n\n  if known_args.command == 'up':\n    launcher.start()\n    launcher.wait_till_up(-1)\n  elif known_args.command == 'down':\n    launcher.shutdown()\n  elif known_args.command == 'ps':\n    launcher.status()\n  else:\n    raise ValueError(\n        'Unknown command %s possible values are %s' %\n        (known_args.command, ', '.join(_COMMAND_POSSIBLE_VALUES)))\n\n\nif __name__ == '__main__':\n  logging.getLogger().setLevel(logging.INFO)\n  main(sys.argv)\n","sourceCodeStart":262,"sourceCodeEnd":288,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/utils/transform_service_launcher.py#L262-L288","documentation":"The beam_transform_service __main__ CLI validates known_args.command against _COMMAND_POSSIBLE_VALUES ('up', 'down', 'ps'). Any other value reaches main()'s else branch and raises ValueError listing the accepted commands.","triggerScenarios":"Running `python -m apache_beam.utils.transform_service_launcher <cmd> ...` (or the wrapper script) with a command other than up/down/ps, e.g. a typo like 'start', 'stop', or 'status'.","commonSituations":"Scripting service lifecycle from CI or notebooks and guessing the command name; docs referencing an older/newer CLI vocabulary; aliasing stop->down incorrectly.","solutions":["Use one of the supported commands: up, down, or ps (run `--help` to see them).","Fix typos in scripts/cron entries (e.g. 'stop' -> 'down', 'status' -> 'ps').","If programmatic control is needed, use TransformServiceLauncher methods (start/shutdown/status) instead of the CLI.","Validate the command argument in wrapper scripts before invoking the module."],"exampleFix":"// before\npython -m apache_beam.utils.transform_service_launcher start --address localhost --port 5000\n// after\npython -m apache_beam.utils.transform_service_launcher up --address localhost --port 5000","handlingStrategy":"validation","validationCode":"valid = {'up', 'down', 'ps'}\nif command not in valid:\n    sys.exit(f'invalid command {command!r}; expected one of {sorted(valid)}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the module with --help to list accepted commands.","Use shell completion or argument validation in wrapper scripts.","Remember: up=start, down=stop, ps=status."],"tags":["python","apache-beam","cli","invalid-argument"],"backgroundTag":"invalid-cli-argument","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}