ValueError occured while deploying Django App


I got this error during the deployment of my Django app:

:42]   File "/workspace/.heroku/python/lib/python3.11/site-packages/dj_database_url/", line 126, in parse
[c-----]     raise ValueError(
[c-----] ValueError: No support for ''. We support: cockroach, mssql, mssqlms, mysql, mysql-connector, mysql2, mysqlgis, oracle, oraclegis, pgsql, postgis, postgres, postgresql, redshift, spatialite, sqlite, timescale, timescalegis

What went wrong? Kind regards,

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you for your support. In the meanwhile I solved the issue

Site Moderator
Site Moderator badge
December 13, 2023

Heya @heintjeb,

The issue seems to be related with the Django App itself rather than something on the App Platform.

The error No support for ''. We support: cockroach, mssql, mssqlms, mysql, mysql-conne... suggests that either the DATABASE_URL environment variable is not set or its value is not in a format that dj_database_url can understand.

Check Your DATABASE_URL Environment Variable: Ensure that the DATABASE_URL environment variable is set correctly in your app’s settings. This variable should contain the full URL to your database, including the database type (like postgres://, mysql://, etc.), username, password, host, port, and database name.

Bobby Iliev
Site Moderator
Site Moderator badge
December 9, 2023

Hi there,

The error you’re encountering during the deployment of your Django app is related to the configuration of your database connection.

The ValueError thrown by the dj_database_url package suggests that it’s unable to recognize the database engine specified in your database URL.

As the value of the engine in the log output is empty, it sounds like you’ve not defined it in your env variables.

Basically, yhe dj_database_url.parse function is designed to parse a database URL and return a Django database configuration dictionary. The error message indicates that the database engine part of your database URL (the scheme) is either missing or not one of the supported types. The supported types, as listed in the error, include various SQL and NoSQL databases like PostgreSQL (postgres), MySQL (mysql), SQLite (sqlite), and others.

You have to make sure that your database URL is set as an environment variable in your App Platform and is also correctly formatted and includes a valid scheme corresponding to the database you’re using. A typical database URL looks like this: scheme://user:password@host:port/dbname.

If you are using a Managed Database Cluster, you can attach it to your app and then use the DATABASE_URL env variable:

Let me know if you have any questions!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel