phoenix
phoenix copied to clipboard
[BUG] 302 `httpx.HTTPStatusError` with 'https://app.phoenix.arize.com'
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
- Sign up to
https://app.phoenix.arize.com/ - Copy the API key
- 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>") - 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
Hi @enrico-stauss - thanks for the report. The URL https://app.phoenix.arize.com/v1/spansproject_name=default&project-name=default looks wrong so will have the team take a look.
The OSS team also doesn't manage the hosted work so please do reach out to them as well (@exiao @fjcasti1)
Hi Team - Kindly let me know, Do we have any update on this issue.
Hi @Narayanan12345, we have a fix on review that will address a big chunk of problems. It will be live today/tomorrow. This fix will allow you to perform operations on datasets and experiments.
However, we do have another issue regarding spans/traces and evaluations involving PyArrow. We will address that next. In addition, you will not get the Redirect HTML anymore, you'll get a proper error.
Hi @Narayanan12345 I have tested this and it works for me, can you confirm that the issue persists? Any additional information would be useful in that case. I'm closing the issue since I can make your code work (at least what I could reproduce), feel free to comment and reopen it if the problem persists