[BUG] dcc.Upload contents and dcc.Geolocation position docstrings describe the wrong value format

Abierto
#4,125 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ZainnQureshii ya está trabajando en esto.

Desde el 6/11/2026.

  • #4126 de @ZainnQureshii — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
30/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python, react

Línea de trabajo

Update the dcc.Upload.contents and dcc.Geolocation.position docstrings in the cited component files: components/dash-core-components/src/components/Upload.react.js and src/components/Geolocation.react.js. Read the current wording alongside the behavior cited in the issue, then check the generated Python help for both components. Done when the help describes contents as a base64 data URL and unavailable position fields as null (None in Python); pull request #4126 is already open.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug P3 size: 1

Describe your context

Current dev (dash 4.5.0). Docs only; no specific browser or OS.

Describe the bug

Two dcc prop docstrings describe a value format the component does not produce. Both reach users through the generated Python help (help(dcc.Upload), help(dcc.Geolocation)).

  1. dcc.Upload.contents says "The contents of the uploaded file as a binary string" (components/dash-core-components/src/components/Upload.react.js:29). The component reads every file with reader.readAsDataURL(file) (src/fragments/Upload.react.js:189) and passes reader.result through unchanged (:173), so contents is a base64 data URL (data:<mime type>;base64,<data>), which callbacks have to split and base64-decode.

  2. dcc.Geolocation.position says the optional fields are included "when available, otherwise it will be NaN" (src/components/Geolocation.react.js:122). The component sets each field with ?? null (:59-65), so an unavailable value arrives as null (None in a Python callback), not NaN.

Expected behavior

  • contents: "The contents of the uploaded file as a base64 encoded data URL (data:<mime type>;base64,<data>)".
  • position: "... otherwise it will be null (None in Python)".

I'm happy to send the PR for both lines.

(Found and written up with AI assistance, Claude Code; the cited lines were checked against dev.)

Lenguaje dominante
Python
Estrellas
24.5k
Forks
2.3k
Merge medio
3 d 7 h
PR fusionados (30 d)
30

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plotly/dash

Todos los issues de plotly/dash

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.