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

Bug #14

Open
AmericanY opened this issue Apr 5, 2021 · 1 comment
Open

Bug #14

AmericanY opened this issue Apr 5, 2021 · 1 comment

Comments

@AmericanY
Copy link

Traceback (most recent call last):
  File "/root/american/script.py", line 103, in <module>
    trio.run(main, parser.parse_args())
  File "/usr/local/lib/python3.9/site-packages/trio/_core/_run.py", line 1932, in run
    raise runner.main_task_outcome.error
  File "/root/american/script.py", line 80, in main
    nurse.start_soon(
  File "/usr/local/lib/python3.9/site-packages/trio/_core/_run.py", line 815, in __aexit__
    raise combined_error_from_nursery
  File "/root/american/script.py", line 35, in worker
    async with trio_mysql.connect(host=ip, user=user, password=password, connect_timeout=2) as connection:
  File "/usr/local/lib/python3.9/site-packages/trio_mysql/connections.py", line 616, in __aenter__
    await self.connect()
  File "/usr/local/lib/python3.9/site-packages/trio_mysql/connections.py", line 669, in connect
    await self._get_server_information()
  File "/usr/local/lib/python3.9/site-packages/trio_mysql/connections.py", line 1105, in _get_server_information
    packet = await self._read_packet()
  File "/usr/local/lib/python3.9/site-packages/trio_mysql/connections.py", line 742, in _read_packet
    raise err.InternalError(
trio_mysql.err.InternalError: Packet sequence number wrong - got 1 expected 0
@AmericanY
Copy link
Author

Update: after checking the following issue PyMySQL#971 and capturing the packet. i found that's due to MariaDB server response Host 'x.x.x.x' is not allowed to connect to this MariaDB server

So i think it's will be better to catch the response itself.

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

1 participant