Computer/이게 왜 안되지?
[이왜안?] UnboundLocalError: cannot access local variable 'smallest_indices' where it is not associated with a value
벼랑끝과학자
2024. 4. 30. 19:43
나의 경우, 함수의 이름과 함수의 결과값을 받을 변수의 이름을 완전히 동일하게 설정해놓은 오류를 범하고 있었다. 리턴되는 값을 저장할 변수의 이름을 바꿔주니 해결되었다.