Hi everyone. I am getting the following ValueError for this exercise. I believe the issue is being caused by this line:
background, segment_time = insert_audio_clip(background, random_activate, previous_segments)
However, I’m not sure what my mistake is. Help would be greatly appreciated.
TMosh
September 4, 2021, 4:42pm
2
I think the problem is with the value for previous_segments.
Check all of the functions where you assign that variable.
1 Like
TMosh
September 4, 2021, 4:53pm
3
The problem could be in Step 3 in insert_audio_clip().
1 Like
Thank you. I indeed made a mistake for insert_audio_clip() . I appended the wrong thing to previous_segments. I didn’t realize my mistake because I still passed all the tests when I ran that cell. Thanks again.
TMosh
September 4, 2021, 7:10pm
5
Can you post your defective code that passed the unit test? I’d like to file an issue report so we can improve that test.
Sure. I accidentally wrote previous_segments.append(previous_segments). Very silly mistake. I am surprised the tests passed.