Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Inconsistent supported media types in `client.media.upload()`: `.wav` rejected, `.mpeg` accepted but not listed in error message

Abierto
#295 3 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
api

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

  1. Install the Plivo Python SDK:

     pip install plivo
    
  2. Attempt to upload a WAV file:

from plivo import RestClient

client = RestClient("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")
client.media.upload(["example.wav", ])

  1. Observe the error:
{
  "error": "File format of the file to be uploaded should be one of JPG, JPEG, PNG or PDF"
}
  1. Attempt to upload an MPEG file:
client.media.upload(["example.mpeg", ])
  1. 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

Image

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

  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 plivo/plivo-python

Todos los issues de plivo/plivo-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.