phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

[BUG] 302 `httpx.HTTPStatusError` with 'https://app.phoenix.arize.com'

Open enrico-stauss opened this issue 5 months ago • 1 comments

Describe the bug I was trying to use the hosted version of Arize Phoenix and it seemed to work with LlamaIndex instrumentation, but when using the px.Client directly I get the described error.

To Reproduce

  1. Sign up to https://app.phoenix.arize.com/
  2. Copy the API key
  3. Execute
    import os
    import phoenix as px
    os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = "api_key=<MY_API_KEY>"
    os.environ["PHOENIX_CLIENT_HEADERS"] = "api_key=<MY_API_KEY>"
    os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "https://app.phoenix.arize.com"
    client = px.Client(endpoint="https://app.phoenix.arize.com", api_key="<API_KEY>")
    client.get_spans_dataframe()
    # OR 
    dataset = client.get_dataset(id="<ID>", version_id="<VERSION_ID>")
    
  4. Get
     Traceback (most recent call last):
         File "...\test.py", line 26, in <module>
             ds = client.get_spans_dataframe()
         File "...\site-packages\phoenix\session\data_extractor.py", line 46, in get_spans_dataframe
             self.query_spans(
         File "...\site-packages\phoenix\session\client.py", line 194, in query_spans
             response.raise_for_status()
         File "...\site-packages\httpx\_models.py", line 763, in raise_for_status
             raise HTTPStatusError(message, request=request, response=self)
     httpx.HTTPStatusError: Redirect response '302 Found' for url 'https://app.phoenix.arize.com/v1/spansproject_name=default&project-name=default'
     Redirect location: '/login'
     For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302
    

I do hope you can reproduce the issue. I had the same problem with version 4.36.0 and tried to resolve by upgrading.

Environment:

  • OS: Windows
  • Version 5.0.0

enrico-stauss avatar Sep 27 '24 10:09 enrico-stauss