LoginSignup
0
0

[Elastic Beanstalk]appじゃなくてapplicationだった

Last updated at Posted at 2023-11-28

概要

Elastic Beanstalkでflaskを実装しようとしたら
applicationが見つからないというエラーが出た

ログ

----------------------------------------
/var/log/web.stdout.log
----------------------------------------
(省略)
Nov 28 05:46:30 ip-172-31-24-160 web[4572]: Failed to find attribute 'application' in 'application'.
Nov 28 05:46:30 ip-172-31-24-160 web[4572]: [2023-11-28 05:46:30 +0000] [4572] [INFO] Worker exiting (pid: 4572)
Nov 28 05:46:30 ip-172-31-24-160 web[4568]: [2023-11-28 05:46:30 +0000] [4568] [ERROR] Worker (pid:4572) exited with code 4
Nov 28 05:46:30 ip-172-31-24-160 web[4568]: [2023-11-28 05:46:30 +0000] [4568] [ERROR] Shutting down: Master
Nov 28 05:46:30 ip-172-31-24-160 web[4568]: [2023-11-28 05:46:30 +0000] [4568] [ERROR] Reason: App failed to load.

解決方法

コード内のappapplicationに変えるだけだった

from flask import Flask

# 変更前
- app = Flask(__name__)
- @app.route("/callback", methods=['POST'])
    # 省略

# 変更後
+ application = Flask(__name__)
+ @application.route("/callback", methods=['POST'])
    # 省略
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0