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.78k stars 1.3k forks source link

Binning a numeric property that isn't really numeric causes an error #12513

Open pauldambra opened 2 years ago

pauldambra commented 2 years ago

Bug description

In this conversation in the community slack https://posthogusers.slack.com/archives/C01GLBKHKQT/p1666985093165389 a user reports that they couldn't breakdown by the "utm_content" property

Their "utm_content" had been detected as numeric. When adding a breakdown the API tried to bin the values because it was a numeric property. Because it had non-numeric values the binning failed

There was no report in Sentry and no useful information in the response to the user.

 payload

insight: 
TRENDS
events: 
[{"id":"$pageview","name":"$pageview","type":"events","order":0,"properties":[]}]
actions: 
[]
display: 
ActionsLineGraph
interval: 
day
new_entity: 
[]
properties: 
{"type":"AND","values":[{"type":"AND","values":[{"key":"utm_name","value":["something"],"operator":"exact","type":"event"}]}]}
filter_test_accounts: 
true
date_from: 
-7d
breakdown_type: 
event
breakdown_histogram_bin_count: 
10
breakdown: 
utm_content
client_query_id: 
a6c7f933-4c0e-4ab1-a170-e9a2c6952776

response

{"type":"server_error","code":"error","detail":"A server error occurred.","attr":null}

How to reproduce

1. 2. 3.

Environment

Additional context

Thank you for your bug report – we love squashing them!

posthog-bot commented 1 week ago

This issue hasn't seen activity in two years! If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in two weeks.