bingo.SearchExact error for component smiles under pyodbc

27 views
Skip to first unread message

Pavlo Musienko

unread,
Aug 22, 2010, 1:13:39 PM8/22/10
to indigo-bugs
Hello all!

I don't know whether it is a bug but I came across the following
problem. While performing queries on exact structure match bingo
produced the following error. Here is one of the queries:
------------------------------------------------------------------
>>> import pyodbc
>>> db = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=localhost;DATABASE=mmdb;UID=mmdb_user;PWD=mmdb-pass;CHARSET=UTF8', autocommit=True)
>>> c = db.cursor()
>>> c.execute("""SELECT * FROM molecule_structure , bingo.SearchExact('molecule_structure', '[CuH8+2].[O-]CCN(C)C.[O-]CCN(C)C', '') t where molecule_structure.id = t.id""")

Traceback (most recent call last):
File "<pyshell#45>", line 1, in <module>
c.execute("""SELECT * FROM molecule_structure ,
bingo.SearchExact('molecule_structure', '[CuH8+2].[O-]CCN(C)C.
[O-]CCN(C)C', '') t where molecule_structure.id = t.id""")
ProgrammingError: ('42000', '[42000] [Microsoft][SQL Server Native
Client 10.0][SQL Server]A .NET Framework error occurred during
execution of user-defined routine or aggregate "_SearchExact": \r
\nSystem.Data.SqlClient.SqlException: Invalid column name \'mol_rowid
\'.\r\nSystem.Data.SqlClient.SqlException: \r\n \xe2
System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection)\r\n \xe2
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)\r\n \xe2
System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.DispatchMessages(Boolean
ignoreNonFatalMessages)\r\n \xe2
Microsoft.SqlServer.Server.SmiEventSink_Default.DispatchMessages(Boolean
ignoreNonFatalMessages)\r\n \xe2
Microsoft.SqlServer.Server.SmiEventSink_Default.DispatchMessages(Boolean
ignoreNonFatalMessages)\r\n \xe2
System.Data.SqlClient.SqlDataReaderSmi.InternalNextResult(Boolean
ignoreNonFatalMessages)\r\n \xe2
System.Data.SqlClient.SqlDataReaderSmi.NextResult()\r\n \xe2
System.Data.SqlClient.SqlCommand.RunExecuteReaderSmi(CommandBehavior
cmdB (6522) (SQLExecDirectW)')
---------------------------------------------------------------------------
As you can see the smiles consists of components separated with a dot.
Moreover the identical bingo.SearchSub query produces no errors.
Actually I am not good in chemistry and maybe that error is supposed
to be produced. I am looking forward to your comments.

I use Bingo 1.5, MS SQL Server 2008 Express, pyodbc 2.1.7, Python 2.6,
WinXP SP2.

Best regards,
Pavlo Musienko



Pavlo Musienko

unread,
Aug 25, 2010, 11:20:29 AM8/25/10
to indigo-bugs
Consider the following query as a workaround for the bingo.SearchExact
error:

SELECT $table.* FROM $table
INNER JOIN bingo.SearchSub('$table', $query, '') t1 ON t1.id =
$table.id
INNER JOIN bingo.SearchGross('$table', '= $gross_formula', '') t2 ON
t1.id = t2.id;

, where the $gross_formula is the goss formula of the searched
molecule. This query offers much less options as the similar
bingo.SearchExact but I suppose can be used as a 'dirty' surrogate. I
would be pleased to have any comments of yours on this query.

Best regards,
Pavlo Musienko.

Michael Rybalkin

unread,
Aug 26, 2010, 5:11:35 AM8/26/10
to indigo-bugs
Hello Pavlo!

Thank you for pointing on this issue. I've fixed it and you can
download fixed version from our site.

With best regards,
Mikhail Rybalkin

On Aug 25, 7:20 pm, Pavlo Musienko <musie...@gmail.com> wrote:
> Consider the following query as a workaround for the bingo.SearchExact
> error:
>
> SELECT $table.* FROM $table
>         INNER JOIN bingo.SearchSub('$table', $query, '') t1 ON t1.id =
> $table.id
>         INNER JOIN bingo.SearchGross('$table', '= $gross_formula', '') t2 ON
> t1.id = t2.id;
>
> , where the $gross_formula is the goss formula of the searched
> molecule. This query offers much less options as the similar
> bingo.SearchExact but I suppose can be used as a 'dirty' surrogate. I
> would be pleased to have any comments of yours on this query.
>
> Best regards,
> Pavlo Musienko.
>
> On 22 Сер, 20:13, Pavlo Musienko <musie...@gmail.com> wrote:
>
>
>
> > Hello all!
>
> > I don't know whether it is a bug but I came across the following
> > problem. While performing queries on exact structure match bingo
> > produced the following error. Here is one of the queries:
> > ------------------------------------------------------------------
>
> > >>> import pyodbc
> > >>> db = pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER=localhost;DATABASE=mmdb;UID=mmdb_user;PWD=mmdb-pass;CHARSET=UT­F8', autocommit=True)
> > >>> c = db.cursor()
> > >>> c.execute("""SELECT * FROM molecule_structure  , bingo.SearchExact('molecule_structure', '[CuH8+2].[O-]CCN(C)C.[O-]CCN(C)C', '') t where molecule_structure.id = t.id""")
>
> > Traceback (most recent call last):
> >   File "<pyshell#45>", line 1, in <module>
> >     c.execute("""SELECT * FROM molecule_structure  ,
> > bingo.SearchExact('molecule_structure', '[CuH8+2].[O-]CCN(C)C.
> > [O-]CCN(C)C', '') t where molecule_structure.id = t.id""")
> > ProgrammingError: ('42000', '[42000] [Microsoft][SQL Server Native
> > Client 10.0][SQL Server]A .NET Framework error occurred during
> > execution of user-defined routine or aggregate "_SearchExact": \r
> > \nSystem.Data.SqlClient.SqlException: Invalid column name \'mol_rowid
> > \'.\r\nSystem.Data.SqlClient.SqlException: \r\n   \xe2
> > System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
> > Boolean breakConnection)\r\n   \xe2
> > System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
> > exception, Boolean breakConnection)\r\n   \xe2
> > System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.DispatchMessages(B­oolean

Pavlo Musienko

unread,
Aug 26, 2010, 5:50:33 AM8/26/10
to indig...@googlegroups.com
Hello Michael!

Thank you for fixing this issue! Works fine!
Good luck!

Best regards,
Pavlo Musienko

--
email: musi...@gmail.com
tel. 80977663886

Reply all
Reply to author
Forward
0 new messages