{"record":{"id":"8917fed151245602","repo":"sqlmapproject/sqlmap","slug":"could-not-create-pulse-audio-stream-s","errorCode":null,"errorMessage":"Could not create pulse audio stream: %s","messagePattern":"Could not create pulse audio stream: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"extra/beep/beep.py","lineNumber":81,"sourceCode":"        _fields_ = [(\"format\", ctypes.c_int), (\"rate\", ctypes.c_uint32), (\"channels\", ctypes.c_uint8)]\n\n    try:\n        pa = ctypes.cdll.LoadLibrary(\"libpulse-simple.so.0\")\n    except OSError:\n        return\n\n    wave_file = wave.open(filename, \"rb\")\n\n    pa_sample_spec = struct_pa_sample_spec()\n    pa_sample_spec.rate = wave_file.getframerate()\n    pa_sample_spec.channels = wave_file.getnchannels()\n    pa_sample_spec.format = PA_SAMPLE_S16LE\n\n    error = ctypes.c_int(0)\n\n    pa_stream = pa.pa_simple_new(None, filename, PA_STREAM_PLAYBACK, None, \"playback\", ctypes.byref(pa_sample_spec), None, None, ctypes.byref(error))\n    if not pa_stream:\n        raise Exception(\"Could not create pulse audio stream: %s\" % pa.strerror(ctypes.byref(error)))\n\n    while True:\n        latency = pa.pa_simple_get_latency(pa_stream, ctypes.byref(error))\n        if latency == -1:\n            raise Exception(\"Getting latency failed\")\n\n        buf = wave_file.readframes(BUFFSIZE)\n        if not buf:\n            break\n\n        if pa.pa_simple_write(pa_stream, buf, len(buf), ctypes.byref(error)):\n            raise Exception(\"Could not play file\")\n\n    wave_file.close()\n\n    if pa.pa_simple_drain(pa_stream, ctypes.byref(error)):\n        raise Exception(\"Could not simple drain\")\n","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/beep/beep.py#L63-L99","documentation":"Error \"Could not create pulse audio stream: %s\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/beep/beep.py:81 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}