[MonetDB-users] No useful error message on SQL syntax error
Hi,
when using MonetSQLdb from Python and the executed SQL contains a syntax error, there is no useful information displayed in the traceback. The following script for example
import MonetSQLdb x = MonetSQLdb.connect() c = x.cursor() c.execute('DROP TABLE test') c.execute('DROP TABLE test')
yield this traceback:
Traceback (most recent call last): File "testMonetDB.py", line 9, in <module> c.execute('DROP TABLE test') File "C:\Python25\lib\site-packages\mdb\MonetSQLdb\cursors.py", line 95, in execute self.errorhandler(self, exc, value) File "C:\Python25\lib\site-packages\mdb\MonetSQLdb__init__.py", line 72, in defaulterrorhandler raise errorclass, errorvalue RuntimeError: None
The Message is None whereas it should be DROP TABLE: no such table 'test'
Kind regards, Markus
On Fri, Nov 23, 2007 at 07:54:26PM +0100, Markus Gritsch wrote:
Hi,
when using MonetSQLdb from Python and the executed SQL contains a syntax error, there is no useful information displayed in the traceback. The following script for example
import MonetSQLdb x = MonetSQLdb.connect() c = x.cursor() c.execute('DROP TABLE test') c.execute('DROP TABLE test')
yield this traceback:
Traceback (most recent call last): File "testMonetDB.py", line 9, in <module> c.execute('DROP TABLE test') File "C:\Python25\lib\site-packages\mdb\MonetSQLdb\cursors.py", line 95, in execute self.errorhandler(self, exc, value) File "C:\Python25\lib\site-packages\mdb\MonetSQLdb__init__.py", line 72, in defaulterrorhandler raise errorclass, errorvalue RuntimeError: None
There was a bug report about this and verified with the reporter that this was fixed. Ie which version are you using? If possible/useful upgrade to the today released 'bugfix' release.
Niels
The Message is None whereas it should be DROP TABLE: no such table 'test'
Kind regards, Markus
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
On Nov 23, 2007 8:52 PM, Niels Nes Niels.Nes@cwi.nl wrote:
There was a bug report about this and verified with the reporter that this was fixed. Ie which version are you using? If possible/useful upgrade to the today released 'bugfix' release.
Ah, very nice. Now it works, thank you.
Markus
participants (2)
-
Markus Gritsch
-
Niels Nes