Re: [cx-oracle-users] cx_Oracle "Expecting None or a String"
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2015-10-03 21:03:57
|
Hi Anurag, Not sure if anyone responded to this but you do have one possibility. The value of STORE is not a string but (for example) an integer. Previous executions of this statement used a value that *was* a string. You can verify that fact by examining traceback or using print statements. You can also work around this by ensuring that the values are always the same type or by creating a new cursor. Hope that helps! Anthony On Tue, Sep 8, 2015 at 11:50 AM, Anurag Chourasia < anu...@gm...> wrote: > All, > > I am on the following cx_Oracle version > > >>> cx_Oracle.version > '5.0.3' > > Time and again I get this error in executing a query > > expecting None or a string > > The query is being executed this way > > cursor.execute("SELECT * FROM APP_STORE WHERE STORE=:STORE %s" > %(order_clause),{'STORE':STORE}) > > What could be the reason? Similar queries executed earlier in the flow > work fine but this one does not. > > Appreciate some guidance on this. > > Regards, > Anurag > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |