代码之家  ›  专栏  ›  技术社区  ›  Sam

在Heroku上部署Python应用程序

  •  1
  • Sam  · 技术社区  · 9 年前

    我用Chatterbot库创建了我的第一个聊天机器人。现在我想通过Heroku部署它,但这是不可能的。

    我的聊天机器人由一些文件组成(py、csv、yml、json、txt)。 结构如下:

    僵尸用户(csv文件)
    Magghy(py文件)
    magghybot(py文件)
    程序文件
    要求(txt文件)

    会话yml(在名为lang的文件夹中)
    数学单词。json(在名为lang的文件夹中)

    我创建了一个“Procfile”(worker:pythonmagghybot.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'
    

    1 回复  |  直到 9 年前
        1
  •  0
  •   Colin Ricardo    9 年前

    您需要在 runtime.txt here 了解更多详细信息。