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

SSLProtocol Abort takes 1 positional argument, but 2 were given #544

Closed
lukehinds opened this issue Jan 10, 2025 · 1 comment
Closed

SSLProtocol Abort takes 1 positional argument, but 2 were given #544

lukehinds opened this issue Jan 10, 2025 · 1 comment
Labels

Comments

@lukehinds
Copy link
Contributor

Describe the issue

The following intermittent error surfaces via asyncio when using the CoPilot provider

Exception in callback SSLProtocol._start_shutdown.<locals>.<lambda>() at /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622
handle: <TimerHandle when=627239.577688583 SSLProtocol._start_shutdown.<locals>.<lambda>() at /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622> module=base_events pathname=/Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/base_events.py

Steps to Reproduce

Unsure how to reproduce this, I suspect its from a when an SSL handshake fails and perhaps a transport close timing issue.

Operating System

Microsoft Windows (Intel)

IDE and Version

N/A

Extension and Version

CoPilot 1.256.0

Provider

GitHub Copilot

Model

GPT-4

Logs

2025-01-10T12:53:45.3dZ [error    ] Exception in callback SSLProtocol._start_shutdown.<locals>.<lambda>() at /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622
handle: <TimerHandle when=626918.903918625 SSLProtocol._start_shutdown.<locals>.<lambda>() at /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622> module=base_events pathname=/Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/base_events.py
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/events.py:84 in _run           │
│                                                                                                  │
│    81 │                                                                                          │
│    82 │   def _run(self):                                                                        │
│    83 │   │   try:                                                                               │
│ ❱  84 │   │   │   self._context.run(self._callback, *self._args)                                 │
│    85 │   │   except (SystemExit, KeyboardInterrupt):                                            │
│    86 │   │   │   raise                                                                          │
│    87 │   │   except BaseException as exc:                                                       │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      cb = 'SSLProtocol._start_shutdown.<locals>.<lambda>() at                                │ │
│ │           /Users/lhinds/.asdf/installs/'+52                                                  │ │
│ │ context = {                                                                                  │ │
│ │           │   'message': 'Exception in callback                                              │ │
│ │           SSLProtocol._start_shutdown.<locals>.<lambda>() at /Users/'+74,                    │ │
│ │           │   'exception': TypeError('SSLProtocol._abort() takes 1 positional argument but 2 │ │
│ │           were given'),                                                                      │ │
│ │           │   'handle': <TimerHandle when=626918.903918625                                   │ │
│ │           SSLProtocol._start_shutdown.<locals>.<lambda>() at                                 │ │
│ │           /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622> │ │
│ │           }                                                                                  │ │
│ │     exc = TypeError('SSLProtocol._abort() takes 1 positional argument but 2 were given')     │ │
│ │     msg = 'Exception in callback SSLProtocol._start_shutdown.<locals>.<lambda>() at          │ │
│ │           /Users/'+74                                                                        │ │
│ │    self = <TimerHandle when=626918.903918625 SSLProtocol._start_shutdown.<locals>.<lambda>() │ │
│ │           at                                                                                 │ │
│ │           /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:622 in <lambda>    │
│                                                                                                  │
│   619 │   │   │   self._set_state(SSLProtocolState.FLUSHING)                                     │
│   620 │   │   │   self._shutdown_timeout_handle = self._loop.call_later(                         │
│   621 │   │   │   │   self._ssl_shutdown_timeout,                                                │
│ ❱ 622 │   │   │   │   lambda: self._check_shutdown_timeout()                                     │
│   623 │   │   │   )                                                                              │
│   624 │   │   │   self._do_flush()                                                               │
│   625                                                                                            │
│                                                                                                  │
│ ╭────────────────────────── locals ───────────────────────────╮                                  │
│ │ self = <asyncio.sslproto.SSLProtocol object at 0x117b77920> │                                  │
│ ╰─────────────────────────────────────────────────────────────╯                                  │
│                                                                                                  │
│ /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:633 in             │
│ _check_shutdown_timeout                                                                          │
│                                                                                                  │
│   630 │   │   │   │   SSLProtocolState.SHUTDOWN                                                  │
│   631 │   │   │   )                                                                              │
│   632 │   │   ):                                                                                 │
│ ❱ 633 │   │   │   self._transport._force_close(                                                  │
│   634 │   │   │   │   exceptions.TimeoutError('SSL shutdown timed out'))                         │
│   635 │                                                                                          │
│   636 │   def _do_flush(self):                                                                   │
│                                                                                                  │
│ ╭────────────────────────── locals ───────────────────────────╮                                  │
│ │ self = <asyncio.sslproto.SSLProtocol object at 0x117b77920> │                                  │
│ ╰─────────────────────────────────────────────────────────────╯                                  │
│                                                                                                  │
│ /Users/lhinds/.asdf/installs/python/3.12.1/lib/python3.12/asyncio/sslproto.py:252 in             │
│ _force_close                                                                                     │
│                                                                                                  │
│   249 │                                                                                          │
│   250 │   def _force_close(self, exc):                                                           │
│   251 │   │   self._closed = True                                                                │
│ ❱ 252 │   │   self._ssl_protocol._abort(exc)                                                     │
│   253 │                                                                                          │
│   254 │   def _test__append_write_backlog(self, data):                                           │
│   255 │   │   # for test only                                                                    │
│                                                                                                  │
│ ╭─────────────────────────────── locals ────────────────────────────────╮                        │
│ │  exc = TimeoutError('SSL shutdown timed out')                         │                        │
│ │ self = <asyncio.sslproto._SSLProtocolTransport object at 0x117cd08f0> │                        │
│ ╰───────────────────────────────────────────────────────────────────────╯                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: SSLProtocol._abort() takes 1 positional argument but 2 were given

Additional Context

No response

@lukehinds
Copy link
Contributor Author

Seems to be related to cpython (they are the only ones with reference to the issue) , I might need to up my python version

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

No branches or pull requests

1 participant