AI LINE Bot練功坊-L13 LineBot部屬
專案資料
可上傳的
app.py
主要要執行的程式
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
由於vercel
中 python
版本的handler
會和app.py
中的handler
互相衝突,所以要將app.py
中的handler
換成line_handler
錯誤訊息
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Reference:https://www.wongwonggoods.com/all-posts/python/python-misc/python-debug-error/vercel-if-not-issubclass-basehttprequesthandler/
-
requirements.txt
放寫程式有用到的套件,雲端才會知道要安裝哪些套件
-
vercel.json
vercel的設定檔
連接vercel來將程式部屬在雲端執行
不能上傳的
.env
放置重要的key以及token的地方,這些敏感的資訊不能直接放在主程式(app.py
)中,而且這個檔案的內容不能外流,否則就危險了
Github
-
建立repository
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
建完後選擇add file,然後選upload files
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
選擇choose your file後,把剛剛Echo-Bot中的 app.py
、requirements.txt
以及vercel.json
上傳到repository,並且在上船完成後進行commit
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Vercel
-
註冊帳號(與剛才的github連動)
-
import專案
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
設定專案名稱以及環境變數
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
環境變數就是linebot的channel access token以及channel secret
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
ps. 如果之後有新的env要上傳,在project中找到setting,然後找到Environment Variable,下面有一個improt.env
,將新的.env
上傳即可
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
設定完成後就進行部屬
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
部屬完成後就點擊continue to dashboard
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
複製紅框中的連結
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
把連結貼到linebot的webhook url上,後面要加上/callback
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
點擊verify後出現以下畫面就代表成功部屬
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Youtube 課程影片
關於我們
國立臺北教育大學 教育大數據微學程
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Facebook
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Instagram
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Threads
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
YouTube
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Line官方帳號
相關教材連結