Azure-Samples / azure-cosmos-db-cassandra-python-getting-started

This repository contains python code showcasing interaction with Cassandra API of Azure Cosmos DB which showcases creation, query and cleanup of data
6 stars 13 forks source link

unpack requires a buffer of 2 bytes #4

Open briglx opened 4 years ago

briglx commented 4 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

clone and run project

Any log messages given by the failure

Exception has occurred: error unpack requires a buffer of 2 bytes

Expected/desired behavior

No error

OS and Version?

Windows 10.

Versions

1909

Mention any other details that might be useful

Error happens on line 38 when tying to exectute this insert_data = session.prepare("INSERT INTO uprofile.user (user_id, user_name , user_bcity) VALUES (?,?,?)")


Thanks! We'll be in touch soon.

psarngal commented 4 years ago

image

thasler commented 3 years ago

any updates on this? I'm having the same issue...

kw217 commented 3 years ago

You need to set the protocol version to 4. The default (66) is DataStax-specific.

chethanv28 commented 3 years ago

@kw217 How to change the protocol version. to 4 ? Can you paste some commands

andreclaudino commented 2 years ago

I have the same problem. HOw to change protocol version? Is it a driver feature or a cosmo db feature?

israel-viveros commented 2 years ago

i have the same error on mac