question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

utils.TestServer.close(): unexpected keyword argument

See original GitHub issue

In pytest_sanic.utils.TestServer.close(), there is this code:

            # Force close connections
            coros = []
            for conn in self.connections:
                if hasattr(conn, "websocket") and conn.websocket:
>                   coros.append(conn.websocket.close_connection(after_handshake=False))
E                   TypeError: close_connection() got an unexpected keyword argument 'after_handshake'

As you can see from the E error here, conn.websocket.close_connection() doesn’t expect an after_handshake arg.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
yunstanfordcommented, Jul 27, 2018

ok, fixed.

0reactions
yunstanfordcommented, Jul 27, 2018

Yeah, but Sanic didn’t release the latest version to pypi. Anyway, I guess I can push a fix for both case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discord.py error: TypeError: __new__() got an unexpected ...
UPDATE I just found out that for some reason, it only works on my test server but not any other servers. Traceback (most...
Read more >
Build error: unexpected keyword argument 'recursive' #40247
+ ext, recursive=True) TypeError: glob() got an unexpected keyword argument 'recursive' make[1]: *** [libnode.target.mk:13: !/
Read more >
TypeError: __init__() got an unexpected keyword argument ...
Hi, I have followed the steps given in the chapter to set up mflix app. After completing all the procedure, the following error...
Read more >
unexpected keyword argument 'package' from launch_testing
I am trying to use launch_testing to create integration tests for my ROS2 node. However, I keep getting the following error:
Read more >
Telethon Documentation - Read the Docs
It will automatically start() the client, logging or ... The telethon.utils module has plenty of methods that make using the library a lot ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found