title: H10 Error in Flask App when deployed on heroku
body: <p>My app is working perfectly on local host but I am getting the following error when I deployed my flask app on heroku</p>
  <pre><code>2020-07-01T09:56:02.982007+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/&quot; host=webscrappingapp.herokuapp.com request_id=59cec0a7-98a3-49d8-b980-779cada2c0d9 fwd=&quot;103.40.197.230&quot; dyno= connect= service= status=503 bytes= protocol=https
  2020-07-01T09:56:03.765421+00:00 heroku[router]: at=error code=H10 desc=&quot;App crashed&quot; method=GET path=&quot;/favicon.ico&quot; host=webscrappingapp.herokuapp.com request_id=b2ddd2b8-5930-4049-993d-3c8e972b10ee fwd=&quot;103.40.197.230&quot; dyno= connect= service= status=503 bytes= protocol=https
  </code></pre>
  <p>Flask file,
  webscrap.py--</p>
  <pre><code>from flask import Flask, render_template
  
  import requests
  from bs4 import BeautifulSoup
  
  from datetime import datetime
  from pytz import timezone
  
  #__name__ == __main__
  app = Flask(__name__)
  URL = 'https://techcrunch.com/'
  page = requests.get(URL)  # type of page -- request
  
  # type coverted to BeautifulSoup
  # second argument how you want to structure your data
  soup = BeautifulSoup(page.content, 'html.parser')
  
  results = soup.find(class_='river river--homepage')
  
  post_elems = results.select('.post-block')
  
  table = [['Sr No', 'Time Stamp', 'News Title', 'Image Source URL', 'Author']]
  i = 1
  
  for post_elem in post_elems:
      header_elem = post_elem.find('header', class_='post-block__header')
      title_elem = header_elem.find('a', class_='post-block__title__link')
      timeStamp_elem = header_elem.find('time')['datetime']
      author_elem = header_elem.find('span')
      image_elem = post_elem.find('img')
      date = datetime.strptime(timeStamp_elem, &quot;%Y-%m-%dT%H:%M:%S%z&quot; )
      row = [i,  date.astimezone(timezone('Asia/Kolkata')).strftime(&quot;%I:%M %p&quot; + &quot; IST &quot; + &quot;%B %d, %Y&quot;), title_elem.text.strip(),
             image_elem.get('src'), author_elem.text.strip()]
      table.append(row)
      i = i + 1
  
  @app.route('/')
  def index():
      return render_template(&quot;index.html&quot;, table=table)
  
  if __name__ == '__main__':
      app.run(debug=True)
  </code></pre>
  <p>Procfile:</p>
  <pre><code>web : gunicorn webscrap:app
  </code></pre>
  <p>Requirements.txt:</p>
  <pre><code>autopep8==1.5.3
  beautifulsoup4==4.9.1
  certifi==2020.6.20
  chardet==3.0.4
  click==7.1.1
  Flask==1.1.2
  gunicorn==20.0.4
  idna==2.10
  itsdangerous==1.1.0
  Jinja2==2.11.2
  MarkupSafe==1.1.1
  pycodestyle==2.6.0
  pytz==2020.1
  requests==2.24.0
  soupsieve==2.0.1
  toml==0.10.1
  urllib3==1.25.9
  Werkzeug==1.0.1
  </code></pre>
  <p>I tried replacing the Procfile content with</p>
  <pre><code>web : gunicorn --bind 0.0.0.0:$PORT webscrap:app
  </code></pre>
  <p>But it didn't worked for me. I also tried replacing <code>app</code> with <code>server</code> but didn't worked. So, please suggest the solution for this problem.</p>
  <p>EDIT:
  My mistake was spacing in Procfile. Correct one is --</p>
  <pre><code>web: gunicorn webscrap:app
  </code></pre>
  <p>But now I am getting H14 error also tried adding <code>heroku ps:scale web=1</code> in Procfile but didn't worked for me.</p>