Inconsistent supported media types in `client.media.upload()`: `.wav` rejected, `.mpeg` accepted but not listed in error message
まだ誰も着手していません。
評価
調査の方向性
Start with plivo/resources/media.py and reproduce the WAV and MPEG cases described in the issue. Compare the SDK validation and error message with the linked Plivo Media API documentation, then verify that the supported formats, validation behavior, and reported message agree. Done means the intended audio/video formats are consistently handled and documented.
索引モデルが issue の本文から書いたものです。
説明
Description
When calling client.media.upload() in the Plivo Python SDK, I receive an error that only image files (JPG, JPEG, PNG and PDF) are allowed, despite documentation and SDK code indicating support for audio/video types.
Steps to Reproduce
-
Install the Plivo Python SDK:
pip install plivo -
Attempt to upload a WAV file:
from plivo import RestClient
client = RestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")
client.media.upload(["example.wav", ])
- Observe the error:
{
"error": "File format of the file to be uploaded should be one of JPG, JPEG, PNG or PDF"
}
- Attempt to upload an MPEG file:
client.media.upload(["example.mpeg", ])
- The upload succeeds and do not produce listed error message.
Expected Behavior
- WAV uploads are accepted per the documentation.
- MPEG uploads succeed in practice and should be recognized in the error message.
- The SDK error message and documentation should list all supported MIME types.
Actual Behavior
- WAV uploads are rejected while only listing image and PDF types.
- MPEG uploads succeed despite not being mentioned in the error output.
Environment
- plivo-python version: latest
- Python version: 3.12
- Operating System: Windows10
References
Plivo Media API documentation
SDK source with error logic
Suggested Fix
Update the SDK to include audio/video extensions (wav, mpeg, etc.) in the allowed list and error message.
Or clarify documentation if certain formats like wav are not intended to be accepted.
- 主要言語
- Python
- スター
- 69
- フォーク
- 67
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plivo/plivo-python のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
plivo/plivo-python#298 · コメント 1 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
plivo/plivo-python#290 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
plivo/plivo-python#289 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
plivo/plivo-python#286 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
plivo/plivo-python#283 ·
plivo/plivo-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
huggingface/smolagents#3106 ·
メンテナーはふだん 2 日以内に返信
-
area:scripts area:tests bug priority:later
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Ikalus1988/MisakaNet#4358 ·
メンテナーはふだん 1 日以内に返信
-
Discovered ports from service discovery are never propagated to modules in Module.load()対応中かも @vishalmore90 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OWASP/Nettacker#1828 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
aws-samples/sample-per-model-bedrock#708 ·
メンテナーはふだん 1 日以内に返信
-
maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100