3

I'm facing with problem when I upgrade clickhouse driver version from 0.0.20 to 0.2.0.

My code:

from variables import aws as config
from clickhouse_driver import Client

host = "localhost"
port = 9000
user = "root"
password = "password"
database = "my_database"

client = Client(host, port=port, database=database, user=user, password=password)


def execute(query):
    return client.execute(query)


if __name__ == '__main__':
    execute("SELECT * FROM my_table WHERE date = today()")

And when I run code above, i received this response without stack trace:

"errorMessage": "Unable to import module 'main': No module named 'clickhouse_driver.varint'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []

If I downgrade version to 0.0.20, every thing working fine, but what happened to 0.2.0?

I'm using this function in AWS Lambda with Python 3.7.

Thanks for your help!

The Blues
  • 211
  • 1
  • 4
  • 15
  • I cannot reproduce this error, it looks like it related to AWS. Could you run this code locally without any dependencies on AWS? – vladimir Apr 16 '21 at 16:32
  • how you check which version of clickhouse_driver installed inside AWS Lambda? – Slach Apr 17 '21 at 05:40

0 Answers0