On Dec 13, 2007, at 11:51 PM, Rick Morrison wrote:
> Just noticed that ResultProxy.fetchall() is a bit broken in 0.4x (I > think it's for queries that do not populate the DBAPI > cursor.description). In my case, it's executing a stored procedure > that returns data: > > > S.execute('exec schema.storedproc 1234').fetchall() > > Traceback (most recent call last): > File "msh.py", line 49, in ? > print S.execute('schema.storedproc 1234').fetchall() > File "/usr/lib/python2.4/site-packages/SQLAlchemy- 0.4.2dev_r3844- > py2.4.egg/sqlalchemy/engine/base.py", line 1249, in __repr__ > return repr(tuple(self)) > File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.2dev_r3844- > py2.4.egg/sqlalchemy/engine/base.py ", line 1241, in __iter__ > yield self.__parent._get_col(self.__row, i) > File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.4.2dev_r3844- > py2.4.egg/sqlalchemy/engine/base.py", line 1500, in _get_col > type_, processor, index = self._key_cache[key] > AttributeError: 'ResultProxy' object has no attribute '_key_cache' > > returns rows but has no cursor.description ? we can work around it, setting _key_cache to something with just an integer __getitem__, if we're known to return rows but no description is there. But it sounds more like an adodbap/pymssql/whatever bug. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---