프로그래밍 언어/python_crawling1 OSError: [Errno 22] Invalid argument: 해결하기 파일을 저장하려고 할때 자주 발생하는 문제입니다. 파일경로나 파일이름에 \,/,:,*,?,",,| 등의 이스케이프 코드 문자가 들어가면 발생합니다. 저는 아래와 같이 파일이름을 저장하려다가 발생했는데요. 1번 방법) path = f"{tname}.txt" 저는 stack overflow를 찾아보고 string prefix를 수정하여 해결했습니다. path = r"{tname}.txt" 출처: OSError [Errno 22] invalid argument when use open() in Python def choose_option(self): if self.option_picker.currentRow() == 0: description = open(":/description_files/program_d.. 2024. 2. 28. 이전 1 다음