{"record":{"id":"96a151d6a8d0de86","repo":"apache/superset","slug":"could-not-find-a-valid-command-to-import-file-96a151","errorCode":null,"errorMessage":"Could not find a valid command to import file","messagePattern":"Could not find a valid command to import file","errorType":"exception","errorClass":"CommandInvalidError","httpStatus":422,"severity":"error","filePath":"superset/commands/query/importers/dispatcher.py","lineNumber":63,"sourceCode":"        self.args = args\n        self.kwargs = kwargs\n\n    def run(self) -> None:\n        # iterate over all commands until we find a version that can\n        # handle the contents\n        for version in command_versions:\n            command = version(self.contents, *self.args, **self.kwargs)\n            try:\n                command.run()\n                return\n            except IncorrectVersionError:\n                logger.debug(\"File not handled by command, skipping\")\n            except (CommandInvalidError, ValidationError):\n                # found right version, but file is invalid\n                logger.exception(\"Error running import command\")\n                raise\n\n        raise CommandInvalidError(\"Could not find a valid command to import file\")\n\n    def validate(self) -> None:\n        pass\n","sourceCodeStart":45,"sourceCodeEnd":67,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/query/importers/dispatcher.py#L45-L67","documentation":"Error \"Could not find a valid command to import file\" thrown in apache/superset.","triggerScenarios":"No importer command matches the uploaded saved-query file format.","commonSituations":"Importing a saved query bundle whose files match no registered importer command.","solutions":["Export the saved queries using the supported export format and retry.","Ensure the archive contains valid saved query YAML files."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}