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

オープン
#4,125 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ZainnQureshii がすでに取り組んでいます。

2026年11月6日 から。

  • #4126 @ZainnQureshii による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
30/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python, react

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.)

主要言語
Python
スター
24.5k
フォーク
2.3k
平均マージ
3日 7時間
マージ済み PR(30日)
30

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/dash のほかの issue

plotly/dash の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。