django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/' : file not found (0) (SQLDriverConnect)")

My django heroku app is building but fails during the release process with the error below. I have followed the CodeWithMosh storefront course but have run into this error. Any help would be appreciated.

django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/' : filo.2.1' : file not found (0) (SQLDriverConnect)") I am using vscode in windows. I followed the CodeWithMosh process and I can run the db in dev mode on my machine.

Below is a snip of the requirements.txt file.



My AptFile configuration is below.


I have installed the MSSQL build pack, and the associated UBUNTU build packs.

django.db.utils.Error: (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘/app/.apt/usr/lib/’ : filo.2.1’ : file not found (0) (SQLDriverConnect)”)

The first buildpack: `` The second buildpack: `` The last buildpack: ``

Heroku support states this outside of their support (which I find… uh unfortunate).

Any thoughts or suggestions are most welcome. Thx

I have re-ran pipenv install pyodbc and pip freeze requirements.txt, but still have the same release fail after a successful build.

remote: -----> Finished adding ODBC Driver 18 for SQL Server
remote: -----> Discovering process types
remote: Procfile declares types → release, web
remote: -----> Compressing…
remote: Done: 182.5M
remote: -----> Launching…
remote: ! Release command declared: this new release will not be available until the command succeed .remote: Released v92
remote: deployed to Heroku
remote: Verifying deploy… done.
remote: Running release command…
remote: Traceback (most recent call last):
remote: File “/app/.heroku/python/lib/python3.12/site-packages/django/db/backends/base/”, line 275, in ensure_connection
remote: self.connect()

django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/app/.apt/usr/lib/' : file not found (0) (SQLDriverConnect)")