You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it works fine before upgrade to v2.14.2 that failed with following log
File "connect_test.py", line 117, in ops_task
async with netdev.create(**router) as net_connect:
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/base.py", line 185, in aenter
await self.connect()
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/ios_like.py", line 75, in connect
await self._establish_connection()
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/base.py", line 218, in _establish_connection
self._conn = await asyncio.wait_for(fut, self._timeout)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
return fut.result()
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 695, in _wrap_awaitable
return (yield from awaitable.await())
File "/home/ec2-user/netdev/lib/python3.8/site-packages/asyncssh/connection.py", line 8264, in connect
new_options = cast(SSHClientConnectionOptions, await _run_in_executor(
TypeError: _run_in_executor() got multiple values for argument 'loop'
there was only one loop value
<_UnixSelectorEventLoop running=True closed=False debug=False>
The text was updated successfully, but these errors were encountered:
zhangyudong12
changed the title
v2.14.2 has interop problem with netdev running with python 3.7
v2.14.2 has interop problem with netdev running with python 3.8
May 21, 2024
Are you by any chance passing in an explicit keyword "loop" argument in your call to connect()? That isn't required, and will be filled in automatically by AsyncSSH (gotten by calling asyncio.get_event_loop()). It's not supporting to try and pass in loop yourself as a keyword argument.
"Removing the 'loop' keyword parameter from the arguments dictionary as you suggested indeed was the solution I needed. Thanks to your quick answer, I could successfully call the <asyncssh.connect()> function without any errors.
it works fine before upgrade to v2.14.2 that failed with following log
File "connect_test.py", line 117, in ops_task
async with netdev.create(**router) as net_connect:
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/base.py", line 185, in aenter
await self.connect()
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/ios_like.py", line 75, in connect
await self._establish_connection()
File "/home/ec2-user/netdev/lib/python3.8/site-packages/netdev/vendors/base.py", line 218, in _establish_connection
self._conn = await asyncio.wait_for(fut, self._timeout)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
return fut.result()
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 695, in _wrap_awaitable
return (yield from awaitable.await())
File "/home/ec2-user/netdev/lib/python3.8/site-packages/asyncssh/connection.py", line 8264, in connect
new_options = cast(SSHClientConnectionOptions, await _run_in_executor(
TypeError: _run_in_executor() got multiple values for argument 'loop'
there was only one loop value
<_UnixSelectorEventLoop running=True closed=False debug=False>
The text was updated successfully, but these errors were encountered: