I have a table in my db, named nameConversions.
The scheme is as follows:
nameConversions = Table('nameConversions', metadata,
    Column('ConversionID', Integer, primary_key=True),
    Column('TaxonCode', String(lenAbbr), nullable=False),
    Column('Note', String(1), nullable=False),
    Column('TaxonNode', Integer, nullable=False),
    Column('OfficialName', String(lenLongName), nullable=True),
    Column('CommonName', String(lenLongName), nullable=True),
    Column('Synonym', String(lenLongName), nullable=True),
)

Now, I am retrieving rows with TaxonCode 'SYTHE1' multiple times using
SELECT, and it succeeds several times. But at the 5th execution with
the keyword, it fails with InterfaceError. Below is the error
message.

sqlalchemy.exc.InterfaceError: (InterfaceError) Error binding
parameter 0 - probably unsupported type. u'SELECT
"nameConversions"."ConversionID", "nameConversions"."TaxonCode",
"nameConversions"."Note", "nameConversions"."TaxonNode",
"nameConversions"."OfficialName", "nameConversions"."CommonName",
"nameConversions"."Synonym" \nFROM "nameConversions" \nWHERE
"nameConversions"."TaxonCode" = ?' ('SYTHE1',)

What I cannot understand is that now that the SELECT process has been
run successfully several times before, why all of a sudden it crashes
with this error message?

What I have checked was whether the types of the keyword are all the
same as 'str', and they are. I can't think of anything I should
investigate other than this. I already have spent too much time on
this. So please help me.

FYI. the python code that's run is the following.
-----------------------------------------------
    for name in names:
        SQLNameConversions =
NameConversions.select(NameConversions.c.TaxonCode==str(name))
        exeNameConversions = SQLNameConversions.execute()
-----------------------------------------------


Thank you guys for your time to read this and to try to help me out.
Justin.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to