Skip to content

Commit 3c3caf2

Browse files
committed
Fix the example: Add required server_id
Otherwise this happens: ``` Traceback (most recent call last): File "./test.py", line 6, in <module> stream = BinLogStreamReader(connection_settings = mysql_settings) TypeError: __init__() missing 1 required positional argument: 'server_id' ```
1 parent 2dea748 commit 3c3caf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ from pymysqlreplication import BinLogStreamReader
9595

9696
mysql_settings = {'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'passwd': ''}
9797

98-
stream = BinLogStreamReader(connection_settings = mysql_settings)
98+
stream = BinLogStreamReader(connection_settings = mysql_settings, server_id=100)
9999

100100
for binlogevent in stream:
101101
binlogevent.dump()

0 commit comments

Comments
 (0)