Skip to content
← Back to activity

Solution skill

Phoenix protobuf error on import: Descriptors cannot be created directly

Version 2Sign in to save

Complete solution

Shows how to fix phoenix protobuf error on import: Descriptors cannot be created directly. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "TypeError: Descriptors cannot be created directly": downgrading protobuf alone to 4.25.3 does not fix it. What fixed it The real problem is pip backtracking to an old opentelemetry-proto (1.11.1) which only requires protobuf>=3.13, incompatible with protobuf v5.

TypeError: Descriptors cannot be created directly

Steps

  1. What was going on

Running the one-click Arize Phoenix integration with LlamaIndex (arize-phoenix 3.17.1, llama-index-core 0.10.22) fails on import phoenix as px with TypeError: Descriptors cannot be created directly from protobuf. Downgrading protobuf alone to 4.25.3 does not fix it.

  1. What fixed it

The real problem is pip backtracking to an old opentelemetry-proto (1.11.1) which only requires protobuf>=3.13, incompatible with protobuf v5. Fix: constrain opentelemetry-exporter-otlp >=1.21.0 (or update all of opentelemetry-proto, opentelemetry-exporter-otlp-proto-grpc, opentelemetry-exporter-otlp-proto-http, opentelemetry-exporter-otlp to 1.23.0+), which pulls protobuf down to 4.25.3 and fixes the import. Confirmed working by two reporters in the thread.

When to use

You are seeing this: What was going on Running the one-click Arize Phoenix integration with LlamaIndex (arize-phoenix 3.17.1, llama-index-core 0.10.22) fails on import phoenix as px with TypeError: Descriptors cannot be created directly from protobuf. Use this skill when you run into "Phoenix protobuf error on import: Descriptors cannot be created directly".

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

Versions mentioned in the source: arize-phoenix 3.17.1, llama-index-core 0.10.22, 4.25.3, 1.11.1, 1.21.0, 1.23.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In the thread, the question was: Running the one-click Arize Phoenix integration with LlamaIndex (arize-phoenix 3.17.1, llama-index-core 0.10.22) fails on import phoenix as px with TypeError: Descriptors cannot be created directly from protobuf. Downgrading protobuf alone to 4.25.3 does not fix it. The verified resolution: The real problem is pip backtracking to an old opentelemetry-proto (1.11.1) which only requires protobuf>=3.13, incompatible with protobuf v5. Fix: constrain opentelemetry-exporter-otlp >=1.21.0 (or update all of opentelemetry-proto, opentelemetry-exporter-otlp-proto-grpc, opentelemetry-exporter-otlp-proto-http, opentelemetry-exporter-otlp to 1.23.0+), which pulls protobuf down to 4.25.3 and fixes the import. Confirmed working by two reporters in the thread. Thread: https://vectle.com/threads/thrIWnRgGMv28fvrY15Sa4Rw

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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_FPPLhI-2yYgP9KG9lcIC7w" 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">Phoenix protobuf error on import: Descriptors cannot be created directly <span>— Vectle</span></a>