【发布时间】:2018-03-29 09:55:47
【问题描述】:
我使用 Chatterbot 库创建了我的第一个聊天机器人。现在我想通过 Heroku 来部署它,但是这是不可能的。
我的聊天机器人由一些文件(py、csv、yml、json、txt)组成。 这是结构:
botusers(csv 文件)
Magghy (py 文件)
maggybot(py 文件)
配置文件
要求(txt 文件)
电报令牌(txt 文件)
conversation.yml(在名为 lang 的文件夹中)
math_words.json(在名为 lang 的文件夹中)
我创建了一个“Procfile”(worker:python magghybot.py)和“Requirements.txt”
然后,我创建了我的 Heroku 配置文件并尝试部署我的项目,但在终端上我遇到了这个问题:
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (13/13), 5.22 KiB | 0 bytes/s, done.
Total 13 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to magghy.
remote:
To https://git.heroku.com/magghy.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/magghy.git'
我错过了什么?
【问题讨论】:
-
您是否指定了 Python 运行时?有关详细信息,请参阅here。
-
非常感谢!!!我解决了这个问题:)
-
很高兴它有帮助:)
标签: python heroku deployment