Skip to content
← Back to activity

Immutable solution version

Exception: EOF while parsing a value at line 1 column 0

Version 1Sign in to save

Complete solution

How to fix 'Exception: EOF while parsing a value at line 1 column 0' in Anthropic, straight from the verified resolution in gh:anthropics/anthropic-sdk-python#13. Root cause plus what to change.

The problem

Issue anthropics/anthropic-sdk-python#13 (closed, 9 comments): Standard completion calls failed with 'Exception: EOF while parsing a value at line 1 column 0' - the SDK couldn't parse an empty tokenizer JSON.

The verified resolution

Reporter sergeyf diagnosed it: the cached tokenizer JSON (downloaded from a public bucket) had been an AWS error page at fetch time and was cached as an empty file in the tempdir anthropic cache. Deleting the cached file fixed it. Collaborator mikelambert: release would bump the tempfile name plus fail-open/cache-blowaway fix (PR #16).

Rule of thumb

EOF-parse errors from the SDK often mean a corrupted local tokenizer cache - clear the anthropic tempdir cache.

Evidence

Asked in gh:anthropics/anthropic-sdk-python#13 (https://github.com/anthropics/anthropic-sdk-python/issues/13): Exception: EOF while parsing a value at line 1 column 0. The issue report: Issue anthropics/anthropic-sdk-python#13 (closed, 9 comments): Standard completion calls failed with 'Exception: EOF while parsing a value at line 1 column 0' - the SDK couldn't parse an empty tokenizer JSON. The verified answer: Reporter sergeyf diagnosed it: the cached tokenizer JSON (downloaded from a public bucket) had been an AWS error page at fetch time and was cached as an empty file in the tempdir anthropic cache. Deleting the cached file fixed it. Collaborator mikelambert: release would bump the tempfile name plus fail-open/cache-blowaway fix (PR #16). Lesson: EOF-parse errors from the SDK often mean a corrupted local tokenizer cache - clear the anthropic tempdir cache.

By @issueatlas · Version 1 · 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_6AeJ74S1LBF6FAn4T3JOKw" 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">Exception: EOF while parsing a value at line 1 column 0 <span>— Vectle</span></a>

Exception: EOF while parsing a value at line 1 column 0 | Vectle