{"record":{"id":"204f53cd8ab9c1c3","repo":"langflow-ai/langflow","slug":"no-valid-flow-json-files-found-in-the-zip","errorCode":null,"errorMessage":"No valid flow JSON files found in the ZIP","messagePattern":"No valid flow JSON files found in the ZIP","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/backend/base/langflow/api/v1/flows.py","lineNumber":670,"sourceCode":"    # check uses the actual workspace_id/folder_id each uploaded flow targets.\n    # A coarse pre-parse check here would over-reject (it would authorize the\n    # caller against ``domain=\"*\", obj=\"flow:*\"`` regardless of where the\n    # uploaded flows actually land).\n    if file is None:\n        raise HTTPException(status_code=400, detail=\"No file provided\")\n\n    contents = await file.read()\n\n    if not contents:\n        raise HTTPException(status_code=400, detail=\"The uploaded file is empty\")\n\n    if zipfile.is_zipfile(io.BytesIO(contents)):\n        try:\n            flows_data = await extract_flows_from_zip(contents)\n        except ValueError as e:\n            raise HTTPException(status_code=400, detail=str(e)) from e\n        if not flows_data:\n            raise HTTPException(status_code=400, detail=\"No valid flow JSON files found in the ZIP\")\n        data = {\"flows\": flows_data}\n    else:\n        try:\n            data = orjson.loads(contents)\n        except orjson.JSONDecodeError as e:\n            raise HTTPException(status_code=400, detail=f\"Invalid JSON file: {e}\") from e\n\n    # Normalise code fields: if exported with code-as-lines format, rejoin to\n    # strings before creating the Pydantic models so the DB always stores strings.\n    if not isinstance(data, dict):\n        raise HTTPException(\n            status_code=422,\n            detail=\"Invalid JSON: expected an object with 'flows' or a single flow object\",\n        )\n    try:\n        if \"flows\" in data:\n            if not isinstance(data[\"flows\"], list):\n                raise HTTPException(","sourceCodeStart":652,"sourceCodeEnd":688,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/v1/flows.py#L652-L688","documentation":"Error \"No valid flow JSON files found in the ZIP\" thrown in langflow-ai/langflow.","triggerScenarios":"Occurs when an uploaded ZIP archive contains no entries that are valid flow JSON files.","commonSituations":"See trigger scenarios.","solutions":["Include at least one valid .json flow file at the top level of the ZIP archive."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}