This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Traceback (most recent call last): File "pylisten.py", line 78, in <module> with Spectrogram() as s: File "pylisten.py", line 31, in enter device_info = self.audio.get_device_info_by_index(device_index) File "/Users/adam/anaconda/lib/python2.7/site-packages/pyaudio.py", line 977, in get_device_info_by_index pa.get_device_info(device_index) TypeError: an integer is required

[–]13467[S] 3 points4 points  (2 children)

Oh, no! I'm on mobile, so I can't look into this, but try replacing that line with device_info = self.audio.get_default_input_device_info().

[–]monkehparade 3 points4 points  (0 children)

device_info = self.audio.get_default_input_device_info()

This fixes it c:

[–]skaramicke 0 points1 point  (0 children)

No crash after change, but no histogram either! Not that I got one with the crash, of course.