Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cursor.execute() throw TypeError #278

Closed
clear2x opened this issue Dec 27, 2021 · 2 comments
Closed

cursor.execute() throw TypeError #278

clear2x opened this issue Dec 27, 2021 · 2 comments

Comments

@clear2x
Copy link

clear2x commented Dec 27, 2021

Describe the bug
Traceback (most recent call last):
File "/workspace/self/python/demo1/TestClickHouse2.py", line 12, in
cursor.execute(sql, [(9, 12, 1, 1)])
File "/workspace/self/python/demo1/venv/lib/python3.8/site-packages/clickhouse_driver/dbapi/cursor.py", line 119, in execute
self._process_response(response)
File "/workspace/self/python/demo1/venv/lib/python3.8/site-packages/clickhouse_driver/dbapi/cursor.py", line 322, in _process_response
rows, columns_with_types = response
TypeError: cannot unpack non-iterable int object

To Reproduce
table:
CREATE TABLE IF NOT EXISTS test.test1
(
tenant_id UInt32,
project_id UInt32,
_sign Int8,
_version UInt32
) ENGINE = VersionedCollapsingMergeTree(_sign, _version)
ORDER BY (tenant_id, project_id);
code:
sql = 'insert into test.test1 (tenant_id, project_id, _sign, _version) values'
cursor.execute(sql, [(9, 12, 1, 1)])

Expected behavior
insert success

Versions
clickhouse-driver Version: 0.2.2
Python 3.8.10

@xzkostyan
Copy link
Member

Fixed yesterday: #276. Try latest master.

@xzkostyan
Copy link
Member

Published in 0.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants