close

[Solved] heroku: no default language could be detected for this app

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error heroku: no default language could be detected for this app in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How heroku: no default language could be detected for this app Error Occurs?

Today I get the following error heroku: no default language could be detected for this app in python.

How To Solve heroku: no default language could be detected for this app Error ?

  1. How To Solve heroku: no default language could be detected for this app Error ?

    To Solve heroku: no default language could be detected for this app Error If you branched from your master branch and all your code is on a, say, develop, push that to the heroku master.

  2. heroku: no default language could be detected for this app

    To Solve heroku: no default language could be detected for this app Error If you branched from your master branch and all your code is on a, say, develop, push that to the heroku master.

Solution 1


I can’t remember how I fixed this but looking at the Date Modified in my files after I posted this question I created two files:

runtime.txt (thanks rurp) which contains:

python-3.5.2

Procfile which contains:

web: gunicorn projectname.wsgi --log-file -

This is a Django project and projectname.wsgi leads to a wsgi.py located at

projectname/wsgi.py

This contains:

import os
import signal

import sys
import traceback

import time
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projectname.settings")

application = get_wsgi_application()
application = DjangoWhiteNoise(application)

Solution 2

For future references, you must ensure that you are pushing the branch with your code to heroku master.

If you branched from your master branch and all your code is on a, say, develop, push that to the heroku master.

So instead of:

git push heroku master

You would do something like:

git push heroku develop:master

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read