Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Sales dashboard: download_org_data 500s with "Object of type generator is not JSON serializable"

Aperta Adatta ai principianti
#8,363 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Iflaqbhat ci sta già lavorando.

Dal 30/9/2026.

  • #8625 di @Iflaqbhat — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
django, python
Ambito
api, backend

Direzione di ricerca

Apri sales_dashboard/views.py e ispeziona download_org_data, quindi riproduci la richiesta che fallisce a /sales-dashboard/organisations/{organisation_id}/download_org_data. Assicurati che l'endpoint non passi più un generatore alla serializzazione JSON e verifica che restituisca i dati dell'organizzazione invece di un 500.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Sentry: FLAGSMITH-API-6DT

What happens

Hitting the sales dashboard org data download endpoint returns a 500. The view passes a generator into json.dumps, which Django's JSON encoder cannot serialise, so the download fails outright.

TypeError: Object of type generator is not JSON serializable

Where

  • Culprit: sales_dashboard/views.py in download_org_data
  • Transaction: /sales-dashboard/organisations/{organisation_id}/download_org_data
  • URL seen: http://api.flagsmith.com/sales-dashboard/organisations/33031/download_org_data

Stack (app frame in bold context)

django/core/handlers/base.py            _get_response
django/contrib/auth/decorators.py       _view_wrapper
sales_dashboard/views.py                download_org_data   <-- in app
json/__init__.py                        dumps
json/encoder.py                         encode
json/encoder.py                         iterencode
django/core/serializers/json.py         default
json/encoder.py                         default

Impact

  • isUnhandled: true — the request 500s, no data is returned
  • Events: 1  |  Users affected: 1
  • First seen: 2026-08-25 14:50:42 UTC  |  Last seen: 2026-08-25 14:50:42 UTC
  • Environment: production  |  Host: ip-172-31-68-88.eu-west-2.compute.internal

Internal staff tool, so blast radius is limited to the sales dashboard — but the endpoint is currently broken for whoever tries it.

Likely fix

Materialise the generator (e.g. list(...)) before serialising, or stream the response with StreamingHttpResponse instead of json.dumps.

Source alert

Slack: https://flagsmith.slack.com/archives/C05GSDTULDB/p1787669458168619

Filed by automated Sentry triage.

Lingua principale
Python
Stelle
6.6k
Fork
584
Merge medio
2g 13h
PR unite (30g)
133

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Flagsmith/flagsmith

Tutte le issue di Flagsmith/flagsmith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.