[Python Flask 오류] AttributeError: 'Blueprint' object has no attribute 'register_blueprint'
flask 웹 개발 중 blueprint로 파일 분리를 했다.
프로젝트가 점점 복잡해지면서 blueprint를 중첩으로 사용하려고 했는데, 오류가 발생
AttributeError: 'Blueprint' object has no attribute 'register_blueprint'
예전 Flask 버전에서는 중첩이 안됐다고 한다. flask를 업데이트 해주면 해결된다.
pip install --upgrade flask
위 명령으로 flask를 업데이트 해주어야 하는데, watchdog 오류가 뜰 수도 있다.
이 경우 아래 링크 참고.
https://dongdongguri.blogspot.com/2024/02/python-flask-importerror-cannot-import.html
댓글
댓글 쓰기