2017-10-17 239 views
1

我用Chatterbot库创建了我的第一个聊天机器人。现在我想通过Heroku部署它,但这是不可能的。我的chatbot是由一些文件(py,csv,yml,json,txt)组成的。 这是如下结构:在Heroku上部署Python应用程序

botusers(CSV文件)
Magghy(PY文件)
magghybot(PY文件)
Procfile
要求(txt文件)
telegramtoken(txt文件)
会话。阳明海运(名为郎文件夹)
math_words.json(名为郎文件夹)

我创建了一个 “Procfile”(工人:蟒蛇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' 

我缺少什么?

+0

您是否指定了Python运行时?有关更多详细信息,请参见[此处](https://devcenter.heroku.com/articles/python-runtimes)。 –

+0

非常感谢!我解决了这个问题:) – Adryr83

+0

很高兴帮助:) –

回答

0

您需要在runtime.txt文件中设置Python运行时。有关更多详细信息,请参阅here