oss2024hnu / coursegraph-py

BSD 2-Clause "Simplified" License
5 stars 69 forks source link

dot 오류 #493

Closed tkdgns08523 closed 3 months ago

tkdgns08523 commented 3 months ago

fad9f2d 버전에서

   else:
        with open(output_file, "w", encoding= "utf-8") as outfile:
                graph.dot(outfile)
        except IOError as e:
            print(f"파일을 저장하는 중 오류가 발생했습니다: {e}")
        except Exception as e:
            print(f"예상치 못한 오류가 발생했습니다: {e}")

이 부분에서 except 문구가 작동이 안되어 실행이 안됨을 확인했습니다.

   else:
        try:
            with open(output_file, "w", encoding= "utf-8") as outfile:
                graph.dot(outfile)
        except IOError as e:
            print(f"파일을 저장하는 중 오류가 발생했습니다: {e}")
        except Exception as e:
            print(f"예상치 못한 오류가 발생했습니다: {e}")

try 문을 넣어 파일이 정상적으로 실행되게 하겠습니다.