Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #93

Open
kalaGN opened this issue Nov 30, 2021 · 1 comment
Open

IndexError: list index out of range #93

kalaGN opened this issue Nov 30, 2021 · 1 comment

Comments

@kalaGN
Copy link

kalaGN commented Nov 30, 2021

使用命令
python binlog2sql.py -h112.3.9.17 -uxxx -pxxx -dcommon --start-file=mysql-bin.000012 --start-datetime='2021-06-09 00:00:00' --stop-datetime='2021-06-10 00:00:00'

打印两条sql后报错

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/lib/python2.7/site-packages/pymysqlreplication/row_event.py", line 428, in rows
self._fetch_rows()
File "/usr/lib/python2.7/site-packages/pymysqlreplication/row_event.py", line 423, in _fetch_rows
self.__rows.append(self._fetch_one_row())
File "/usr/lib/python2.7/site-packages/pymysqlreplication/row_event.py", line 476, in _fetch_one_row
row["values"] = self._read_column_data(self.columns_present_bitmap)
File "/usr/lib/python2.7/site-packages/pymysqlreplication/row_event.py", line 165, in _read_column_data
self.packet.read_uint_by_size(column.size) - 1]
IndexError: list index out of range

@michael-liumh
Copy link

用 python3 试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants