Python

[Python] 파이썬 AttributeError: partially initialized module 'csv' has no attribute 'reader' (most likely due to a circular import) 에러 해결

Let it out 2024. 4. 17. 13:17

에러 내용

AttributeError: partially initialized module 'csv' has no attribute 'reader' (most likely due to a circular import)

같은 에러가 발생하는 경우가 있다.

 

 

 

에러이유

파일명이 이미 존재하는 모듈명과 중복되면 발생한다.(ex pandas.py, math.py)

 

 

해결 방법

모듈명과 겹치지 않게 csv_example.py 처럼 파일이름을 모듈명과 다르게 지어주면된다.

반응형