Replies

I am running this script on a Windows box. The Cos script file was written using notepad++. Because of this the file had windows line terminators.

The Fix: I updated the file replacing the Windows linefeeds with unix line feeds. The script functions perfectly now.

Thank-you for the help.

Eduard Lebedyuk; thank-you for your help.

Unfortunately, switching to IRIS is not an option as we are preparing to support clients who are not prepared to upgrade to IRIS; at least not yet. I will, though, look at PythonGateway.

Again, thank-you for the help.

Kevin McGinn

I am running Python 3.7.4 if that makes a difference.

"select 1" generates the same error:

    tHdl.prepare(sql)
intersys.pythonbind3.cache_exception: file=intersys/pythonbind3.c line=3355 err=-1 message=cbind_prepare_gen_query()

What is more perplexing is if I create a python script using an ODBC connection instead of pythonbind3,  the select does work. But I prefer not to use ODBC.

I added the import of the traceback lib as you suggested. Putting the traceback  statement after the execute or fetch caused an error stating that "last_type" does not exist which would I should see if no errors were found (as I understand it) . I changed the select to "select * ....." and that produced the error:

  File "getTables.py", line 45, in main
    tHdl.prepare(sql)
intersys.pythonbind3.cache_exception: file=intersys/pythonbind3.c line=3355 err=-1 message=cbind_prepare_gen_query()

an even more confusing error for which I have not found any info on the error condition.

I changed the the statement to "select count(*)...." that was a mistake. The python script never returned.