{"record":{"id":"8d75ff6818cbcc5c","repo":"unslothai/unsloth","slug":"load-timed-out-last-progress-prog","errorCode":null,"errorMessage":"load timed out (last progress: {prog})","messagePattern":"load timed out \\(last progress: (.+?)\\)","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"scripts/compare_engines.py","lineNumber":49,"sourceCode":"def _median(xs):\n    return sorted(xs)[len(xs) // 2]\n\n\ndef bench_pytorch(repo, gguf, resolutions, steps, seed, iters):\n    import torch\n    from core.inference.diffusion import DiffusionBackend\n\n    rows = []\n    backend = DiffusionBackend()\n    for speed in (\"off\", \"default\"):\n        backend.begin_load(repo, gguf_filename = gguf, speed_mode = speed)\n        deadline = time.time() + 1800  # 30 min: never hang on a stuck download/load\n        while backend.load_progress().get(\"phase\") != \"ready\":\n            prog = backend.load_progress()\n            if prog.get(\"phase\") == \"error\":\n                raise RuntimeError(prog)\n            if time.time() > deadline:\n                raise TimeoutError(f\"load timed out (last progress: {prog})\")\n            time.sleep(0.5)\n        for res in resolutions:\n\n            def gen():\n                torch.cuda.synchronize()\n                t0 = time.time()\n                backend.generate(\n                    prompt = PROMPT,\n                    width = res,\n                    height = res,\n                    steps = steps,\n                    guidance = 0.0,\n                    seed = seed,\n                    batch_size = 1,\n                )\n                torch.cuda.synchronize()\n                return time.time() - t0\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/scripts/compare_engines.py#L31-L67","documentation":"Thrown by fetchYoutubeTranscript (youtube-api.ts:21-43) when POST /api/youtube/transcript fails and the response body has no FastAPI `detail` field (or the body failed to parse as JSON). The status is embedded in the message, e.g. 'Could not fetch the transcript (403)'. The backend proxies YouTube's caption endpoints, so most failures originate upstream of the studio backend.","triggerScenarios":"POST /api/youtube/transcript with a URL that is not a valid video (400), a video with captions disabled or no captions in the requested languages (404), YouTube rate-limiting or blocking the backend's IP (403/429), or the backend lacking outbound access to youtube.com (502/empty body).","commonSituations":"Passing a Shorts/playlist URL instead of a video URL; requesting languages the video has no captions for; running the backend from a datacenter IP that YouTube blocks; transcripts disabled by the uploader; regional restrictions.","solutions":["Verify the URL is a plain youtube.com/watch?v=… video URL and that the video has captions enabled.","Widen the `languages` preference list (e.g. add 'en') or pass [] to accept any available language.","If 403/429: the backend IP is rate-limited by YouTube — wait or route egress differently; retry after a backoff.","Check backend logs for the upstream YouTube error to see the exact refusal reason.","If the video simply has no captions, there is no fix — the transcript cannot be fetched."],"exampleFix":"// before\nawait fetchYoutubeTranscript(url, ['de'], signal);\n\n// after — fall back to any available caption language\nawait fetchYoutubeTranscript(url, ['de', 'en'], signal).catch((e) => {\n  if (/\\(404\\)$/.test(e.message)) return fetchYoutubeTranscript(url, [], signal);\n  throw e;\n});","handlingStrategy":"try-catch","validationCode":"function normalizeYoutubeUrl(input: string): string | null {\n  try {\n    const u = new URL(input);\n    if (u.hostname.replace(/^www\\./, '') !== 'youtube.com' && u.hostname.replace(/^www\\./, '') !== 'youtu.be') return null;\n    return u.toString();\n  } catch { return null; }\n}","typeGuard":"function isTranscriptFetchError(e: unknown): e is Error {\n  return e instanceof Error && /^Could not fetch the transcript \\(\\d+\\)$/.test(e.message);\n}","tryCatchPattern":"try {\n  const t = await fetchYoutubeTranscript(url, ['en'], signal);\n} catch (error) {\n  const status = Number(/\\((\\d+)\\)$/.exec((error as Error).message)?.[1]);\n  if (status === 404) { /* no captions for these languages — retry with [] */ }\n  else if (status === 429 || status === 403) { /* YouTube throttle: back off and retry later */ }\n  else toast.error((error as Error).message);\n}","preventionTips":["Validate the URL is a real YouTube video link before calling the API.","Always include a fallback language preference (or pass an empty list to accept any).","Cache transcript results to avoid repeated upstream fetches that trigger rate limits."],"tags":["http","youtube","transcript","api","frontend"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}