Inconsistent supported media types in `client.media.upload()`: `.wav` rejected, `.mpeg` accepted but not listed in error message
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 69
- Forks
- 67
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de plivo/plivo-python
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
plivo/plivo-python#298 · 1 comentario · 2 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#290 · 1 comentario ·
-
Error while number setupAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#289 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#286 ·
-
README.me broken linksAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
plivo/plivo-python#283 ·
Todos los issues de plivo/plivo-python
Issues similares
-
Project submission:Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
slavakurilyak/awesome-ai-agents#845 ·
Los mantenedores suelen responder en 1 día
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodifficulty:2 enhancement good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
MakazhanAlpamys/Soup#2178 ·
Los mantenedores suelen responder en 1 día
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
scverse/rapids-singlecell#854 ·
Los mantenedores suelen responder en 1 día
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPosiblemente ocupada @ninglinLiu la tomó hoy. Abiertoarea:frontend backend:slang bug direction:input
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=FalsePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 13 días