AssertionError: Result length not requested length
peijianbo opened this issue · 2 comments
mysql:8.0.25
mysql-replication:0.28
python:3.8
error:
/Users/tu/Desktop/daily_demo/venv/bin/python /Users/tu/Desktop/daily_demo/mysql_binlog.py
=== RotateEvent ===
Position: 4
Next binlog file: mysql-bin.000001
=== FormatDescriptionEvent ===
Date: 2022-04-08T15:33:35
Log position: 125
Event size: 98
Read bytes: 0
Traceback (most recent call last):
File "/Users/tu/Desktop/daily_demo/mysql_binlog.py", line 7, in
for binlogevent in stream:
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/binlogstream.py", line 496, in fetchone
binlog_event = BinLogPacketWrapper(pkt, self.table_map,
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/packet.py", line 136, in init
self.event = event_class(self, event_size_without_header, table_map,
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/event.py", line 197, in init
self._read_status_vars_value_for_key(status_vars_key)
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/event.py", line 262, in _read_status_vars_value_for_key
db = self.packet.read_string()
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/packet.py", line 481, in read_string
char = self.read(1)
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysqlreplication/packet.py", line 157, in read
return self.packet.read(size)
File "/Users/tu/Desktop/daily_demo/venv/lib/python3.8/site-packages/pymysql/protocol.py", line 74, in read
raise AssertionError(error)
AssertionError: Result length not requested length:
Expected=1. Actual=0. Position: 86. Data Length: 86
Process finished with exit code 1
solved when reinstall mysql-replication:0.25
solved when reinstall mysql-replication:0.25
Yep. That worked for me as well.
Thanks.