TypeError("Invalid file: {0!r}".format(self.name))

86 views
Skip to first unread message

ZD 619

unread,
Jan 5, 2024, 4:19:36 PM1/5/24
to librosa
Hi, when trying to use librosa.load to access the attributes of my file I keep on getting the same error no matter how I try to fix it. This error is TypeError("Invalid file: {0!r}".format(self.name)). Despite the file I am using being in wav format. 

Please help as it is urgent, thanks 

Screenshot 2024-01-03 21.16.04.png

Brian McFee

unread,
Jan 5, 2024, 4:20:46 PM1/5/24
to librosa
The problem is that you're loading the file with librosa.load, which returns a tuple of ndarray and float (the buffer and the sample rate), but you are treating this return tuple as if it was a string.
Reply all
Reply to author
Forward
0 new messages