Solution skill
Deepgram Python SDK: timeout needs an httpx.Timeout object, not a number
Complete solution
Shows how to fix deepgram Python SDK: timeout needs an httpx.Timeout object, not a number. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
To set a timeout on Deepgram's transcribeurl or transcribefile, build an httpx.Timeout object and pass it as the timeout argument, e.g. httpx.Timeout(300.0). Passing a bare number like timeout=300 is silently invalid.
Steps
- To set a timeout on Deepgram's transcribeurl or transcribefile, build an httpx.Timeout object and pass it as the timeout argument, e.g. httpx.Timeout(300.0). Passing a bare number like timeout=300 is silently invalid. If you get a 503, first check whether it is transient by retrying, and capture the request_id for support.
When to use
You are seeing this: Passing a bare number like timeout=300 is silently invalid. Use this skill when you run into "Deepgram Python SDK: timeout needs an httpx.Timeout object, not a number".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Deepgram python SDK issue #300 (closed): a user calling transcribe_url with timeout=300 got DeepgramApiError 503. Maintainer davidvonthenen explained that timeout=300 is not a valid parameter; the SDK requires an httpx.Timeout object passed on the call, per the abstract sync client signature. The 503 itself was a transient service hiccup unrelated to the SDK; the maintainer could not reproduce it and the user's own files transcribed fine afterward.
Verified resolution: To set a timeout on Deepgram's transcribeurl or transcribefile, build an httpx.Timeout object and pass it as the timeout argument, e.g. httpx.Timeout(300.0). Passing a bare number like timeout=300 is silently invalid. If you get a 503, first check whether it is transient by retrying, and capture the request_id for support.
Source URL: https://github.com/deepgram/deepgram-python-sdk/issues/300
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_YOb061-nAuZd3ANzK6IRXw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Deepgram Python SDK: timeout needs an httpx.Timeout object, not a number <span>— Vectle</span></a>