로딩
요청 처리 중입니다...

[python] AttributeError: 'module' object has no attribute 'generate_tokens'

 [python] AttributeError: 'module' object has no attribute 'generate_tokens'

#python #error 오늘의 에러 AttributeError: 'module' object has no attribute 'generate_tokens' (AttributeError: module 'tokenize' has no attribute 'tokenize') 발생 원인 파이썬 파일 이름 중에서 tokenize.py를 가진 파일을 내가 생성했었고, 파이썬 모듈에서도 tokenize.py 모듈을 불러오는 함수가 있었던것, 즉, 파일 이름이 충돌되면서 내가 만든 파일을 사용하게 되었고, 에러가 발생하게 됨 해결 방안 import tokenize print(tokenize) # 위와 같이 실행시켜보면 모듈의 위치가 존재하는 곳의 경로가 뜬다.

해당 파일의 이름을 변경시키면 에러없이 잘 돌아간다....

# error # python