PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.22k stars 1.26k forks source link

IndexError: list index out of range #23115

Open sentry-io[bot] opened 3 months ago

sentry-io[bot] commented 3 months ago

Sentry Issue: POSTHOG-1BY1

IndexError: list index out of range
(7 additional frame(s) were not displayed)
...
  File "posthog/api/services/query.py", line 50, in process_query_dict
    return process_query_model(
  File "posthog/api/services/query.py", line 133, in process_query_model
    result = query_runner.run(execution_mode=execution_mode, user=user, query_id=query_id)
  File "posthog/hogql_queries/query_runner.py", line 491, in run
    **self.calculate().model_dump(),
  File "posthog/hogql_queries/insights/trends/trends_query_runner.py", line 391, in calculate
    final_result = self.apply_formula(self.query.trendsFilter.formula, returned_results)
  File "posthog/hogql_queries/insights/trends/trends_query_runner.py", line 780, in apply_formula
    "data": [0] * len(results[0][0].get("data") or any_result.get("data") or []),
aspicer commented 3 months ago

This hasn't been seen in 5 days. Tentatively fixed?

webjunkie commented 3 months ago

I think Sentry just made a new issue that looks the same. I merged it.