Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain inputs to wave.open() result in readframes returning a str instead of bytes #68796

Closed
ChristopheBiocca mannequin opened this issue Jul 10, 2015 · 3 comments
Closed
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ChristopheBiocca
Copy link
Mannequin

ChristopheBiocca mannequin commented Jul 10, 2015

BPO 24608
Nosy @serhiy-storchaka
Files
  • python_wave_error.py: Simple script showing the issue.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2015-07-10.19:28:43.522>
    created_at = <Date 2015-07-10.18:37:45.246>
    labels = ['type-bug', 'library']
    title = 'Certain inputs to wave.open() result in readframes returning a str instead of bytes'
    updated_at = <Date 2015-07-10.19:28:43.521>
    user = 'https://bugs.python.org/ChristopheBiocca'

    bugs.python.org fields:

    activity = <Date 2015-07-10.19:28:43.521>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-07-10.19:28:43.522>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2015-07-10.18:37:45.246>
    creator = 'Christophe Biocca'
    dependencies = []
    files = ['39891']
    hgrepos = []
    issue_num = 24608
    keywords = []
    message_count = 3.0
    messages = ['246575', '246578', '246579']
    nosy_count = 3.0
    nosy_names = ['python-dev', 'serhiy.storchaka', 'Christophe Biocca']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24608'
    versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

    @ChristopheBiocca
    Copy link
    Mannequin Author

    ChristopheBiocca mannequin commented Jul 10, 2015

    Basically, some (malformed or empty?) WAV strings result in the empty string being returned when calling readframes.

    That string cannot be passed back to writeframes() without causing a crash, since it does not implement the buffer interface.

    @ChristopheBiocca ChristopheBiocca mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 10, 2015
    @serhiy-storchaka serhiy-storchaka self-assigned this Jul 10, 2015
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 10, 2015

    New changeset 9e035639516c by Serhiy Storchaka in branch '3.4':
    Issue bpo-24608: chunk.Chunk.read() now always returns bytes, not str.
    https://hg.python.org/cpython/rev/9e035639516c

    New changeset 64b2d154a5db by Serhiy Storchaka in branch '3.5':
    Issue bpo-24608: chunk.Chunk.read() now always returns bytes, not str.
    https://hg.python.org/cpython/rev/64b2d154a5db

    New changeset 8befb15024b5 by Serhiy Storchaka in branch 'default':
    Issue bpo-24608: chunk.Chunk.read() now always returns bytes, not str.
    https://hg.python.org/cpython/rev/8befb15024b5

    @serhiy-storchaka
    Copy link
    Member

    Thank you for your report Christophe.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant