run clickhouse-mysql get error ImportError: cannot import name 'charset_to_encoding' from 'pymysql.charset'
zhituanchen opened this issue · 0 comments
[root@mytestuse pymysql]# clickhouse-mysql
Traceback (most recent call last):
File "/usr/local/bin/clickhouse-mysql", line 5, in
from clickhouse_mysql import main
File "/usr/local/python3/lib/python3.7/site-packages/clickhouse_mysql/init.py", line 4, in
from .main import Main
File "/usr/local/python3/lib/python3.7/site-packages/clickhouse_mysql/main.py", line 21, in
from clickhouse_mysql.config import Config
File "/usr/local/python3/lib/python3.7/site-packages/clickhouse_mysql/config.py", line 4, in
from clickhouse_mysql.reader.mysqlreader import MySQLReader
File "/usr/local/python3/lib/python3.7/site-packages/clickhouse_mysql/reader/mysqlreader.py", line 8, in
from pymysqlreplication import BinLogStreamReader
File "/usr/local/python3/lib/python3.7/site-packages/pymysqlreplication/init.py", line 23, in
from .binlogstream import BinLogStreamReader
File "/usr/local/python3/lib/python3.7/site-packages/pymysqlreplication/binlogstream.py", line 10, in
from .packet import BinLogPacketWrapper
File "/usr/local/python3/lib/python3.7/site-packages/pymysqlreplication/packet.py", line 7, in
from pymysqlreplication import constants, event, row_event
File "/usr/local/python3/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 9, in
from pymysql.charset import charset_to_encoding
ImportError: cannot import name 'charset_to_encoding' from 'pymysql.charset' (/usr/local/python3/lib/python3.7/site-packages/pymysql/charset.py)
[root@mytestuse pymysql]# pip3 list
Package Version
clickhouse-driver 0.1.4
clickhouse-mysql 0.0.20200128
configobj 5.0.6
mysql-replication 0.21
mysqlclient 2.0.1
pip 20.2.3
PyMySQL 0.10.0
pytz 2020.1
setuptools 47.1.0
six 1.15.0
tzlocal 2.1
[root@mytestuse pymysql]#