After trying to solve this problem on my own I need some help or nudge in right direction.
I wrote and deployed Scrapy spider on Scrapinghub. This spider collects some data and after finish saves that data to remote Microsoft SQL Server. I use SQLAlchemy as ORM and Pyodbc as a driver. For connecting to a DB in spider code I use:
params = quote_plus('DRIVER={ODBC Driver 13 for SQL Server};SERVER="server";DATABASE="db";UID="user";PWD="pass")
engine = create_engine("mssql+pyodbc:///?odbc_connect={}".format(params))
On my local PC with Win10 all work well - spider successfully connects to a remote DB and save data.
But if I try to run this spider on Scrapinghub I get an error:
DBAPIError: (pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found (0) (SQLDriverConnect)")
Seems like a problem with DRIVER
part. I tried to change DRIVER={ODBC Driver 13 for SQL Server}
to a DRIVER={SQL Server}
or DRIVER={FreeTDS}
but still getting the same error can't open lib 'lib_name' : file not found
.
Does Scrapinghub support connection to a Microsoft SQL Server at all? What driver parameters do I need to use in order to successfully connect?
Thank you!