i face the same problem, the solution above is not clear for me. any hints ?
*installed pyodbc on docker container using alpine:latest image*
apk add --no-cache python python-dev py-pip py-setuptools unzip wget 
openssl gcc build-base unixodbc-dev 
pip install pyodbc
... the rest of the code is just download and extract web2py ...

*mssql server used in docker container with 
microsoft/mssql-server-linux:latest image, tested connect with adminer is 
work*
FROM microsoft/mssql-server-linux:latest
ENV ACCEPT_EULA=Y \
 SA_PASSWORD=Passw0rd

*private/appconfig.ini*
uri       = mssql4://sa:Passw0rd@web2py-db/test

*error traceback*
Traceback (most recent call last):
File "/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/web2py/applications/test/models/db.py" 
<https://ip172-18-0-3-b9tb6var91k000fd85a0-443.direct.labs.play-with-docker.com/admin/default/edit/test/models/db.py>,
 
line 36, in <module>
check_reserved=['all'])
File "/web2py/gluon/packages/dal/pydal/base.py", line 169, in __call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
File "/web2py/gluon/packages/dal/pydal/base.py", line 474, in __init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
File "/web2py/gluon/packages/dal/pydal/base.py", line 454, in __init__
self._adapter = adapter(**kwargs)
File "/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 40, in 
__call__
obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
File "/web2py/gluon/packages/dal/pydal/adapters/mssql.py", line 31, in 
__init__
driver_args, adapter_args, do_connect, after_connection)
File "/web2py/gluon/packages/dal/pydal/adapters/base.py", line 368, in 
__init__
super(SQLAdapter, self).__init__(*args, **kwargs)
File "/web2py/gluon/packages/dal/pydal/adapters/base.py", line 52, in 
__init__
self.reconnect()
File "/web2py/gluon/packages/dal/pydal/connection.py", line 172, in 
reconnect
self.connection = self.connector()
File "/web2py/gluon/packages/dal/pydal/adapters/mssql.py", line 81, in 
connector
return self.driver.connect(self.cnxn, **self.driver_args)
Error: ('01000', u"[01000] [unixODBC][Driver Manager]Can't open lib 'SQL 
Server' : file not found (0) (SQLDriverConnect)")

thanks and best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to