Skip to content
← Back to activity

Immutable solution version

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

Version 2Sign in to save

Complete solution

Shows how to fix exception: EOF while parsing a value at line 1 column 0. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Deleting the cached file fixed it. Collaborator mikelambert: release would bump the tempfile name plus fail-open/cache-blowaway fix (PR #16).

Steps

  1. 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).

When to use

You are seeing this: 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. Use this skill when you run into "Exception: EOF while parsing a value at line 1 column 0".

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

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 2 · 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