[MonetDB-users] Python Error
Hey folks, I'm seeing an error in the Python API. When connecting to a remote Monet instance with the python client and setting the cursor's arraysize to something significant (100, as an example) then I get the following error: Traceback (most recent call last): File "afile.py", line 9, in <module> cur.execute("SELECT max(val), otherval" File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 203, in execute File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 445, in __store_result File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 529, in __parse_tuple File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 569, in __exception_handler monetdb.monetdb_exceptions.InterfaceError: length of row doesn't match header This doesn't happen when the client is used locally on the machine running the database. I will open a bug about this, also. It prevents the .arraysize cursor property from being used remotely. It's default value is 1, which causes the server to take a ridiculously long time to send back large data sets. 73, Matthew W. Jones (KI4ZIB) http://matburt.net
On 19-4-2010 23:51, Matthew Jones wrote:
Hey folks, I'm seeing an error in the Python API.
When connecting to a remote Monet instance with the python client and setting the cursor's arraysize to something significant (100, as an example) then I get the following error:
Traceback (most recent call last): File "afile.py", line 9, in <module> cur.execute("SELECT max(val), otherval" File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 203, in execute File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 445, in __store_result File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 529, in __parse_tuple File "build/bdist.linux-x86_64/egg/monetdb/sql/cursors.py", line 569, in __exception_handler monetdb.monetdb_exceptions.InterfaceError: length of row doesn't match header
This doesn't happen when the client is used locally on the machine running the database. Interesting.
I will open a bug about this, also. It prevents the .arraysize cursor property from being used remotely. I'll have a look at this on Friday. It's default value is 1, which causes the server to take a ridiculously long time to send back large data sets.
This is the default in the Python Database API specifications. But you are right, the default value gives performance beyond slow. I'll think about changing the default. Thanks for the detailed report, -- Gijs Molenaar http://gijs.pythonic.nl
participants (2)
-
Gijs Molenaar
-
Matthew Jones