본문 바로가기
AI/error

error: bad character range s-2 at position 7

by DEV Lee 2020. 8. 22.

https://stackoverflow.com/questions/41659309/got-bad-character-range-in-regex-when-using-comma-after-dash-but-not-reverse/41659384

 

Got `bad character range` in regex when using comma after dash but not reverse

I have tried this command in python console: re.match('^\<.+\>([\w\s-,]+)\<.+\>$', 'Carrier-A') and I got: Traceback (most recent call last): File "", line 1, in <m...< p=""> </m...<>

stackoverflow.com

학습시킨 데이터셋의 이름에 '-'가 포함되어 생긴 에러.

(오타로 stairs_25를 stairs-25로 놓고 dataset과 annotation에 넣음)

파일 명을 -에서 _로 바꾸고 재실행 해주니까 바로 해결.

댓글