Phoenix.otel Register Method Error: UnboundLocalError Explained
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
