Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Error while closing the websocket connection

    Python SDK
    0
    2
    15
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mohitag last edited by mohitag

      Hi,

      I am facing an error while closing the websocket connection.

      "__on_close() takes 2 positional arguments but 4 were given."

      Could someone please help with this issue?

      1 Reply Last reply Reply Quote 0
      • M
        mohitag last edited by mohitag

        @admin I think there is some issue with the __on_close function which was causing this error. In the function definition I added 2 additional arguments a and b as shown below. This fixed the error I was getting while closing the connection using ss.ws.close().

        23474fa1-a05c-47fe-ac62-49d07f52c2a9-image.png

        Kindly look into it.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post