Hy-yh
'module' object is not callable 파이썬 본문
'module' object is not callable
모듈 객체를 불러올 수 없다.
문제점
from tr2
class Main():
def __init__(self):
super().__init__()
tr2()
오류코드: 'module' object is not callable
개선 후
from tr2 import tr2
class Main():
def __init__(self):
super().__init__()
tr2()
if __name__ == "__main__":
Main()
tr2이라는 클래스를 부를 목적으로 무심코 from만햇더니 모듈을 불러와지게됨 -> import를 붙여주니 해결
참고: devday.tistory.com/entry/TypeError-module-object-is-not-callable
'Coding > Python' 카테고리의 다른 글
RSI 실제값으로 쓰이는 최근 가중치 계산 (0) | 2023.08.06 |
---|---|
파이참 단축키 (0) | 2020.12.14 |
파이썬 가상환경 만들기 (0) | 2020.12.14 |