app.play(
5752252443,
MediaStream(
MediaDevices.get_audio_devices()[0],
),
) // this method caused the error
//error
Traceback (most recent call last):
File “C:Pytgcallsapp.py”, line 123, in
MediaDevices.get_audio_devices()[0],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:UserslakshAppDataLocalProgramsPythonPython312Libsite-packagespytgcallssync.py”, line 55, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:UserslakshAppDataLocalProgramsPythonPython312Libasynciobase_events.py”, line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File “C:UserslakshAppDataLocalProgramsPythonPython312Libsite-packagespytgcallsmedia_devicesmedia_devices.py”, line 83, in get_audio_devices
list_raw = result.split(‘DirectShow audio devices’)[1]
IndexError: list index out of range
Lakshmi Muppalla is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.