반응형 flask2 [Error] AttributeError: 'GradientBoostingClassifier' object has no attribute '_loss' AttributeError: 'GradientBoostingClassifier' object has no attribute '_loss' Flask를 통해 Web 배포를 하는 도중 다음과 같은 오류가 발생했다. 2023-01-27 07:24:56,974: Exception on /predict [POST] Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1.. 2023. 1. 30. [Error] jinja2.exceptions.TemplateNotFound: jinja2.exceptions.TemplateNotFound: Flask 공식문서의 Quickstart - Rendering Templates를 보게 되면 다음과 같은 설명이 있다. 결론부터 말하자면 templates 폴더를 생성해 안에 적용하고 싶은 template을 넣으면 된다. Generating HTML from within Python is not fun, and actually pretty cumbersome because you have to do the HTML escaping on your own to keep the application secure. Because of that Flask configures the Jinja2 template engine for you automat.. 2023. 1. 7. 이전 1 다음 반응형