Hi Team, on using the register method from the phoenix.otel I am getting an issue today, strangely I was not getting any issues will 23rd of May, after a little gap I resumed my work on some POC that I was building leveraging Phoenix, but today it gives me error. Note - I am trying to use the Phoenix to connect with simple chats and follow the traces and then do evaluation. Using the Phoenix cloud and my personal OpenAI API key. snippet in use: from phoenix.otel import register # Setup Tracing tracer_provider = register( project_name="openai-agents-PhoenixTraceEval", endpoint="https://app.phoenix.arize.com/v1/traces", auto_instrument=True, ) Error:
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
<ipython-input-4-1eb6abebacd9> in <cell line: 0>()
2
3 # Setup Tracing
----> 4 tracer_provider = register(
5 project_name="openai-agents-PhoenixTraceEval",
6 endpoint="https://app.phoenix.arize.com/v1/traces",
1 frames
/usr/local/lib/python3.11/dist-packages/phoenix/otel/otel.py in _tracing_details(self)
234 )
235
--> 236 using_simple_processor = isinstance(span_processor, _SimpleSpanProcessor)
237 span_processor_warning = "| \n"
238 if os.name == "nt":UnboundLocalError: cannot access local variable 'span_processor' where it is not associated with a value
This is a known bug in recent versions of Phoenix, caused by an uninitialized local variable (span_processor) in the _tracing_details method of the phoenix.otel module. The error started appearing after May 23, 2025, and is triggered when calling register() with certain arguments, such as auto_instrument=True and a custom endpoint. The root cause is that span_processor is referenced before being assigned a value in some code paths (see details).The recommended solution is to upgrade to the latest version of arize-phoenix (at least 9.0.1), which contains a fix for this issue. You can upgrade using: LBKSpip install --upgrade arize-phoenix arize-phoenix-otelLBKSWould you like more detail on the bug or the upgrade process?Sources:
- GitHub Issue: python register function failing. Some strawberry schema error popping up from nowhere.
馃挕聽Hint: Mention RunLLM in the thread for followups.
Let us know if RunLLM's suggested solution does not solve your issue
Upgrading the package is not resolving the issue. Please check this is the package version I have installed in my environment. Name: arize-phoenix Version: 10.1.0 Summary: AI Observability and Evaluation Home-page: Author: Author-email: Arize AI <phoenix-devs@arize.com> License: Elastic-2.0 Location: /usr/local/lib/python3.11/dist-packages Requires: aioitertools, aiosqlite, alembic, arize-phoenix-client, arize-phoenix-evals, arize-phoenix-otel, authlib, cachetools, email-validator, fastapi, grpc-interceptor, grpcio, httpx, jinja2, numpy, openinference-instrumentation, openinference-semantic-conventions, opentelemetry-exporter-otlp, opentelemetry-proto, opentelemetry-sdk, opentelemetry-semantic-conventions, pandas, protobuf, psutil, pyarrow, pydantic, python-multipart, scikit-learn, scipy, sqlalchemy, sqlean-py, starlette, strawberry-graphql, tqdm, typing-extensions, uvicorn, wrapt Required-by: Name: arize-phoenix-otel Version: 0.10.0 Summary: LLM Observability Home-page: Author: Author-email: Arize AI <phoenix-devs@arize.com> License: Elastic-2.0 Location: /usr/local/lib/python3.11/dist-packages Requires: openinference-instrumentation, openinference-semantic-conventions, opentelemetry-exporter-otlp, opentelemetry-proto, opentelemetry-sdk, opentelemetry-semantic-conventions, typing-extensions Required-by: arize-phoenix
It looks like some others are reporting the same behavior on this version of phoenix otel https://github.com/Arize-ai/phoenix/issues/7745 let me bring it up with the teams, and sorry for the inconvenience while we look into this
The team is aware of the issue and is working actively to resolve, thanks for your patience
I know it may be difficult to mention at this point, but is there a timeline I can know when it will be fixed? So I will plan my POC as per that timeline. I have been using Arize Phoenix in my POCs as an observability tool 馃檪
We are working on it as we speak 馃槄 this is our current priority
I would hope that we get a fix out for you today
Can you try v0.10.1 https://pypi.org/project/arize-phoenix-otel/
