Bug #79339
dataviz: natural_sort_key, le text vaut "None" (TypeError: expected string or bytes-like object)
Début:
03 juillet 2023
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/112824/
TypeError: expected string or bytes-like object (6 additional frame(s) were not displayed) ... File "combo/apps/dataviz/views.py", line 74, in get chart = form.instance.get_chart( File "combo/apps/dataviz/models.py", line 387, in get_chart data['series'][0]['data'] = self.process_one_dimensional_data( File "combo/apps/dataviz/models.py", line 597, in process_one_dimensional_data data = self.sort_values(chart, data) File "combo/apps/dataviz/models.py", line 619, in sort_values tmp_items = sorted(zip(chart.x_labels, data), key=natural_sort_key) File "combo/apps/dataviz/models.py", line 617, in natural_sort_key return [int(text) if text.isdigit() else text.lower() for text in digit_re.split(item[0])]
Révisions associées
dataviz: handle numbers in pie chart labels (#79339)
Historique
Mis à jour par Valentin Deniaud il y a 10 mois
À mon avis c'est plus général, il y a regroupement par heures donc des entiers en légende, et le tri alphanumérique sur les entiers se prend les pieds dans le tapis.
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Nouveau à En cours
Valentin Deniaud (vdeniaud) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/combo/pulls/128
- Titre : WIP: dataviz VS entiers (#79339)
- Modifications : https://git.entrouvert.org/entrouvert/combo/pulls/128/files
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Solution proposée à Solution validée
Serghei Mihai (smihai) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a 10 mois
- Statut changé de Solution validée à Résolu (à déployer)
Valentin Deniaud (vdeniaud) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/combo/pulls/128
- Titre : dataviz VS entiers (#79339)
- Modifications : https://git.entrouvert.org/entrouvert/combo/pulls/128/files
Mis à jour par Transition automatique il y a 10 mois
- Statut changé de Résolu (à déployer) à Solution déployée
dataviz: handle numbers in labels alphabetical sort (#79339)