Procfile Heroku

2024/11/18 23:42:43

I tried to deploy my first Telegram chatbot (done with Chatterbot library) on Heroku. The files of my chatbot are: requirements (txt file) Procfile (worker: python magghybot.py) botusers (csv file) Magghy (py file) magghybot (py file) runtime (txt file) telegramtoken (txt file) conversations (yml file in folder named lang) math_words (json file in folder named lang)

When I tried to deploy through terminal I have this result:

Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (14/14), 5.27 KiB | 0 bytes/s, done.
Total 14 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote:  !     Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
remote:  !     Learn more: https://devcenter.heroku.com/articles/procfile
remote: -----> Installing python-2.7.14
remote: -----> Installing pip
remote: -----> Installing requirements with pip
remote:        Collecting altgraph==0.10.2 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 1))
remote:          Downloading altgraph-0.10.2.tar.gz (481kB)
remote:        Collecting backports.shutil-get-terminal-size==1.0.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 2))
remote:          Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
remote:        Collecting bdist-mpkg==0.5.0 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 3))
remote:          Downloading bdist_mpkg-0.5.0.tar.gz
remote:        Collecting bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote:          Could not find a version that satisfies the requirement bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4)) (from versions: )
remote:        No matching distribution found for bonjour-py==0.3 (from -r /tmp/build_a73484ff05f07a99f75f8542f74b80fe/requirements.txt (line 4))
remote:  !     Push rejected, failed to compile Python app.
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'

Please, can you help me? I already created a Procfile with only this string:

worker: python magghybot.py
Answer

I solved, with a command touch Procfile. This command created a file without extension, so I put my string worker: python magghybot.py. :)

https://en.xdnf.cn/q/118610.html

Related Q&A

How do i loop a code until a certain number is created?

This task is to determine the difference between two attributes, strength and skill, from game characters. The process for this is:Determining the difference between the strength attributes. The differ…

Finding the longest list in given list that contains only positive numbers in Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.Want to improve this question? Update the question so it focuses on one problem only by editing this post.Closed l…

How to create multiple VideoCapture Objects

I wanted to create multiple VideoCapture Objects for stitching video from multiple cameras to a single video mashup.for example: I have path for three videos that I wanted to be read using Video Captur…

How to read Data from Url in python using Pandas?

I am trying to read the text data from the Url mentioned in the code. But it throws an error:ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2url="https://cdn.upgrad.…

Testing multiple string in conditions in list comprehension [duplicate]

This question already has answers here:How to test multiple variables for equality against a single value?(31 answers)Closed 6 years ago.I am trying to add multiple or clauses to a python if statement…

Filter range from two dates in the same query Django/Python

I need the result from a query that filters two dates from the same model. I need to get in the result 5 days (today plus 4 days) from original date and sale from target date (today plus 4 more days) b…

Python While/For loop

how can I make this into a while loop and output the same thing????for x in range(56,120) :if (x < 57) :summation = 0summation = x + summationif (x == 119) :print (“Sum of integers from 56 to 1…

Read a file into a nested dictionary?

Say I have a simple file like so holding arbitrary values:A, 20, Monday, 14, Tuesday, 15, Tuesday, 16 B, 40, Wednesday, 14, Friday, 12How would I get it into a nested dictionary so that each k/v pair l…

Using .replace function

I have a code with more than 2500 lines that contains several references to GIS layers. I need to replace these layers in the code for several web maps so I have to find a way to automate a find and re…

Python Turtle unit of measurement

When we instantiate a turtle object, we can draw a circle. I wonder about the radius parameter of the circle() method. import turtle myTurtle = turtle.Turtle() myTurtle.circle(50)What is the unit of me…