Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSODBCSQL17 missing in Python runtime image #2543

Open
rjschave opened this issue Nov 19, 2024 · 0 comments
Open

MSODBCSQL17 missing in Python runtime image #2543

rjschave opened this issue Nov 19, 2024 · 0 comments

Comments

@rjschave
Copy link

Bug Report

  • At what date and time did you most recently experience the problem?

    11/18/2024

  • Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.

    Offline use

  • If your repo is publicly available please share its URL:

  • What happened?

    I built a docker container for my app using mcr.microsoft.com/oryx/python:3.11 (same issue occurs with mcr.microsoft.com/oryx/python:3.12).

    Attempted to browse to my application and received the following error:

    ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

    I expected to find MSODBC17 in the /opt/microsoft directory, but the microsoft directory does not exist.

    Other python specific dependencies that were installed from https://github.com/microsoft/Oryx/blob/main/images/runtime/python/install-dependencies.sh are present.

    I found this commit - Python Bookworm Image Fixes #2475, indicating there was a problem with installing the MSODBCSQL drivers on bookworm. This fix is from 4 months ago, but the Python image I pulled is from 6 months ago.

    Is there a newer Python runtime image I should be pulling?

  • What did you expect or want to happen?

    I expected the Django app to be able to connect to the MS SQL database.

  • How can we reproduce it?

  • Do you have log output? Please include between the backticks:

django.db.utils.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")
172.17.0.1 - - [19/Nov/2024:13:00:22 +0000] "GET /favicon.ico HTTP/1.1" 500 202669 "http://localhost:8080/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant