my bad, wrong error pasted. Here's the same error on the latest version...

Traceback (most recent call last):
  File "C:\Temp\web2py_src\web2py\gluon\restricted.py", line 220, in restricted
    exec ccode in environment
  File "C:/Temp/web2py_src/web2py/applications/test/models/db.py" 
<http://127.0.0.1:8088/admin/default/edit/test/models/db.py>, line 15, in 
<module>
    db = DAL('mssql://web2py:aaaaaaaaa@asdflasdf/tgtest',pool_size=1)
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 7868, in __init__
    raise RuntimeError("Failure to connect, tried %d times:\n%s" % (attempts, 
tb))
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 7846, in __init__
    self._adapter = ADAPTERS[self._dbname](**kwargs)
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 688, in __call__
    obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 3455, in __init__
    if do_connect: self.reconnect()
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 669, in reconnect
    self.connection = f()
  File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 3452, in connector
    return 
self.driver.connect(server=host,database=db,user=user,password=password,port=1433,
 tds_version=0x70000000,autocommit=False)
  File "C:\Python27\lib\site-packages\pytds\__init__.py", line 1084, in connect
    conn._open()
  File "C:\Python27\lib\site-packages\pytds\__init__.py", line 313, in _open
    raise last_error
AttributeError: '_TdsSession' object has no attribute 'login'


On Thursday, August 21, 2014 1:59:34 PM UTC-7, Niphlod wrote:
>
> BTW: I don't see any dbapi.py in the main repo..... are you on the latest 
> version ?
>
> On Thursday, August 21, 2014 10:53:06 PM UTC+2, Niphlod wrote:
>>
>>
>>
>> On Thursday, August 21, 2014 10:34:17 PM UTC+2, Derek wrote:
>>>
>>> I've been working on adding it to the DAL but I ran into some issues 
>>> with it... the main thing is it doesn't support DSN syntax, but I got past 
>>> that by modifying the DAL.py file myself (just to see what it would look 
>>> like once I got past that point). 
>>>
>>> Now I am getting an error (which I reported)
>>>
>>> File "C:\Temp\web2py_src\web2py\gluon\dal.py", line 3452, in connector 
>>> return 
>>> self.driver.connect(server=host,database=db,user=user,password=password,port=1433,
>>>  
>>> tds_version=0x71000000) File 
>>> "C:\Python27\lib\site-packages\pytds\dbapi.py", line 259, in __init__ 
>>> self._open() File "C:\Python27\lib\site-packages\pytds\dbapi.py", line 171, 
>>> in _open raise err AttributeError: '_TdsSession' object has no attribute 
>>> 'login'
>>> I'm confident that once this issue gets fixed, everything should be good 
>>> for the DSN implementation.
>>>
>>> On that note, I have to question why the DAL insists on passing a DSN. 
>>> It's merely a footnote in the DBAPI 2.0 specs, and it doesn't seem to be 
>>> actually required to be compliant.
>>>
>>>
>> I think it's because there are other adapters that don't override the 
>> connect method, and the DSN was the only "universal" working with all of 
>> them. 
>>
>

-- 
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