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

AssertionError: Result length not requested length #371

Open
peijianbo opened this issue Apr 8, 2022 · 2 comments
Open

AssertionError: Result length not requested length #371

peijianbo opened this issue Apr 8, 2022 · 2 comments

Comments

@peijianbo
Copy link

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

@peijianbo peijianbo reopened this Apr 8, 2022
@peijianbo
Copy link
Author

solved when reinstall mysql-replication:0.25

@githubjsorg
Copy link

solved when reinstall mysql-replication:0.25

Yep. That worked for me as well.

Thanks.

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