Infinidat / infi.clickhouse_orm

A Python library for working with the ClickHouse database (https://clickhouse.yandex/)
BSD 3-Clause "New" or "Revised" License
414 stars 136 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 76: invalid start byte #174

Open sangensong opened 3 years ago

sangensong commented 3 years ago

My python's version is python3.8.5 and my orm's version is 2.1.0

  File "/usr/local/lib/python3.8/dist-packages/infi/clickhouse_orm/database.py", line 281, in select
    yield model_class.from_tsv(line, field_names, self.server_timezone, self)
  File "/usr/local/lib/python3.8/dist-packages/infi/clickhouse_orm/models.py", line 390, in from_tsv
    values = iter(parse_tsv(line))
  File "/usr/local/lib/python3.8/dist-packages/infi/clickhouse_orm/utils.py", line 81, in parse_tsv
    line = line.decode()

It's possible to make line = line.decode(errors='ignore')