Hi, I’m working on a project where I access MySQL to fetch data.
The app works perfectly when running it locally. But when I deploy, it returns this error:
in module
connect = pyodbc.connect(connection_string)
pyodbc.Error: (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘SQL Server’ : file not found (0) (SQLDriverConnect)”)
Unfortunatelly I can’t share the app because it is private. Does anyone know how to solve this? It is NOT a problem with requirements.txt
@st.experimental_memo(ttl=300) #timer in seconds to update de database
def run_query(query):
with connect.cursor() as cursor:
cursor.execute(query)
return cursor.fetchall()