Closed jmartinez-jobsity closed 7 years ago
When running something like:
with pytds.connect(as_dict=True, **settings.mssql) as conn: with conn.cursor() as cursor: cursor.callproc(self.SP_NAME) for row in cursor: print(row)
I'm getting a 'NoneType' object has no attribute 'fetchone' from the _session being None
'NoneType' object has no attribute 'fetchone'
_session
> /usr/lib/python3.5/site-packages/pytds/__init__.py(744)fetchone() -> row = self._session.fetchone() (Pdb) self._session is None True
For now, the workaround is to iterate over cursor.fetchall(), but I think iterating over the cursor directly should not raise that exception
cursor.fetchall()
Can you provide full stack trace? Also can you test it on current tip of master branch?
Seems to be fixed now
When running something like:
I'm getting a
'NoneType' object has no attribute 'fetchone'
from the_session
being NoneFor now, the workaround is to iterate over
cursor.fetchall()
, but I think iterating over the cursor directly should not raise that exception