tarantool / tarantool-python

Python client library for Tarantool
https://www.tarantool.io
BSD 2-Clause "Simplified" License
101 stars 46 forks source link

Error on server-side function call #92

Closed vananiev closed 7 years ago

vananiev commented 7 years ago

Version tarantool-python-0.6.1-1.el7.centos.noarch, for

Name        : tarantool
Version     : 1.6.9.84

import tarantool conn = tarantool.connect(host = 'localhost', port='3301', user='us', password='pass') indices = conn.call("pt.indices").data.pop() returns

  File "/usr/lib/python2.7/site-packages/tarantool/connection.py", line 373, in call
    response = self._send_request(request)
  File "/usr/lib/python2.7/site-packages/tarantool/connection.py", line 341, in _send_request
    return self._send_request_wo_reconnect(request)
  File "/usr/lib/python2.7/site-packages/tarantool/connection.py", line 261, in _send_request_wo_reconnect
    response = Response(self, self._read_response())
  File "/usr/lib/python2.7/site-packages/tarantool/response.py", line 87, in __init__
    raise DatabaseError(self._return_code, self._return_message)
tarantool.error.DatabaseError: (48, 'Unknown request type 10')

With version tarantool-python-0.5.4-20.el7.centos.noarch.rpm it's work.

zimnukhov commented 7 years ago

Try setting call16=True.

conn = tarantool.connect(host = 'localhost', port='3301', user='us', password='pass', call16=True)

Request type for Call has changed in recent versions. I believe this library could figure out required call16 value during handshake, but it doesn't.

bigbes commented 7 years ago

@zimnukhov is right, with version 1.6 you could use call16=True OR 0.5* version of this driver.

vananiev commented 7 years ago

Thanks!