[Python] "AttributeError: 'NoneType' object has no attribute 'method'" 해결


[Python]

문제상황: 다음 코드는 실무에서 사용될 수 있는 코드로, 데이터베이스에 연결하여 테이블을 생성하는 클래스를 구현합니다. 실행 도중, "AttributeError: 'NoneType' object has no attribute 'method'" 에러가 발생했습니다. import sqlite3 class DatabaseManager: def __init__(self, db_name): self.db_name = db_name self.conn = None self.cur = None def connect(self): self.conn = sqlite3.connect(self.db_name) self.cur = self.conn.cursor() def create_table(sel..


원문링크 : [Python] "AttributeError: 'NoneType' object has no attribute 'method'" 해결