danfengcao / binlog2sql

Parse MySQL binlog to SQL you want
GNU General Public License v3.0
3.33k stars 1.04k forks source link

LookupError: unknown encoding: swe7 #81

Open sjditadmin opened 3 years ago

sjditadmin commented 3 years ago

环境:Server version: 5.7.29-log MySQL Community Server (GPL) 报错如下: Traceback (most recent call last): File "binlog2sql.py", line 150, in binlog2sql.process_binlog() File "binlog2sql.py", line 105, in process_binlog for row in binlog_event.rows: File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 433, in rows self._fetch_rows() File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 428, in _fetch_rows self.rows.append(self._fetch_one_row()) File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 481, in _fetch_one_row row["values"] = self._read_column_data(self.columns_present_bitmap) File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 136, in _read_column_data values[name] = self.read_string(column.length_size, column) File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 224, in __read_string string = string.decode(encoding) LookupError: unknown encoding: swe7

fengbinddr commented 3 years ago

是否是pymysqlreplication 依赖包的问题? 我生产环境下的依赖: PyMySQL==0.7.11 wheel==0.29.0 mysql-replication==0.13