I was able to do this and have it work:
results = self._session.execute("SELECT NEWID() as token").first()[0]
On Fri, Jul 2, 2021 at 1:27 PM Mike Bayer <[email protected]> wrote:
>
> I'm not familiar with this issue and would need to see a complete stack trace
> and preferably a simple test script (MCVE) as well, but at the very least a
> stack trace, as well as SQLAlchemy version in use, database dialect / driver
> in use. thanks.
>
> On Fri, Jul 2, 2021, at 2:31 PM, Larry Martell wrote:
>
> I have this code:
> cursor = self._session.execute("SELECT NEWID() as token")
> results = self.fetch_results(cursor)
> And I get this error:
>
> 'ResultProxy' object has no attribute 'description'
>
> How can I get around this issue?
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlalchemy/CACwCsY6NPK%3DwWUJh-nw560%2BGJC7_4tSkgsQ%3DKub0Uf%2BPoVsbLw%40mail.gmail.com.