On Jan 30, 2014, at 4:39 PM, jack2318 <[email protected]> wrote:
> Hi,
>
> I experience very strange behaviour in version 0.9.1 (no problem in version
> 0.8.4) - I can't image that it is problem in SQLAlchemy but I don't see why I
> am getting error running this code:
>
>
> tbl_session = Table('SESSION', metadata, autoload=True)
>
> stmt = tbl_session.select(tbl_session).where(tbl_session.c.SID == sid)
> result = conn.execute(stmt).fetchone()
>
> if result != None:
>
> and here when comparing result to None I am getting:
>
> Unexpected error: <type 'exceptions.TypeError'> 'NoneType' object is not
> iterable
this is fixed as of d4c908ded1e9a7923312f which will be in 0.9.2, however for
now it’s best to use the more traditional system of checking for presence using
“if not result:” or “if result is not None”.
signature.asc
Description: Message signed with OpenPGP using GPGMail
