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

Code:50. Unknown type Bool #399

Closed
anikey7531 opened this issue Nov 10, 2023 · 1 comment
Closed

Code:50. Unknown type Bool #399

anikey7531 opened this issue Nov 10, 2023 · 1 comment

Comments

@anikey7531
Copy link

anikey7531 commented Nov 10, 2023

Hi.
I get an error when trying to insert a value of type bool
`
client = Client(ip,password=pass,settings={"use_numpy":False})
df=pd.DataFrame({ "b1":[True,False] })

df.to_dict('records')

client.execute(f'INSERT INTO tmp.t1 (b1) VALUES', df.to_dict('records') )

`

`90 return cls(**column_options)
92 except KeyError as e:
---> 93 raise errors.UnknownTypeError('Unknown type {}'.format(e.args[0]))

UnknownTypeError: Code: 50. Unknown type Bool`

if i use method insert_dataframe get error too

  • Version of package with the problem.
  • ClickHouse server version. 23.3.1.2823
  • Python version. 3.10
@xzkostyan
Copy link
Member

Current version 0.2.7 doesn't have this problem. Bool support was added in 0.2.3 https://github.com/mymarilyn/clickhouse-driver/blob/master/CHANGELOG.md#023---2022-02-07 and in 0.2.5 for numpy.

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