Navigation

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

    Web scoket error

    Python SDK
    3
    11
    98
    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.
    • A
      admin @Javajp last edited by

      @Javajp said in Web scoket error:

      I had a script to get live data which was working fine from more than a month, ni suddenly I am seeing this error
      Error info: 'SSLDispatcher' object has no attribute 'read'
      'SSLDispatcher' object has no attribute 'read'
      Error info: __on_close() takes 2 positional arguments but 4 were given
      __on_close() takes 2 positional arguments but 4 were given.
      Kindly help!!

      we have noted this we will get back to you on this.

      A 1 Reply Last reply Reply Quote 0
      • A
        AkshayKalwar @admin last edited by

        @admin I have the same exact issue as what @Javajp is facing kindly update on the fix

        1 Reply Last reply Reply Quote 0
        • J
          Javajp @Javajp last edited by

          @admin, pls see I am running this on Google Collab, historical APIs work fine, created new app as well which didn't help

          A 2 Replies Last reply Reply Quote 0
          • A
            admin @Javajp last edited by

            Hi @Javajp Have you installed all the necessary libraries.

            J 1 Reply Last reply Reply Quote 0
            • J
              Javajp @admin last edited by

              @admin yes below 2 packages were the one I was using yesterday and nothing chang d from yesterday.

              !pip install smartapi-python
              !pip install websocket-client

              1 Reply Last reply Reply Quote 0
              • A
                admin @Javajp last edited by

                Hi @Javajp said in Web scoket error:

                @admin, pls see I am running this on Google Collab, historical APIs work fine, created new app as well which didn't help

                we tested it and it is working fine from our end
                d0a87130-81ad-40b7-8d99-237434f86285-image.png

                J 1 Reply Last reply Reply Quote 0
                • J
                  Javajp @admin last edited by Javajp

                  @admin, the example you provided is of historical API which is working fine.

                  I tried to narrow the problem on the web socket by taking the example provided in documentation, it seems to work fine on my personal PC, but same doesn't work on google colab, I am NOT sure if you would be really bothered about it, but it could be a good use case for you, and also the fact it was working fine till yesterday (not sure if google colab has pushed some updates...)

                  I will try to attach snap ofof side by side of non-working vs working. some server error not letting me to attach.
                  ![0_1638893343444_Smart_API_Socket error.PNG](Uploading 100%)

                  1 Reply Last reply Reply Quote 0
                  • A
                    AkshayKalwar last edited by

                    For me the issue is resolved I guess will confirm once the market starts but I think the websocket-client version was updated to 1.2.3 from 1.2.2 after I created a new venv and started from the scratch

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      Javajp @AkshayKalwar last edited by

                      @AkshayKalwar , @admin
                      It works fine now without any changes, thanks for ur time.

                      1 Reply Last reply Reply Quote 0
                      • A
                        ashigro last edited by

                        this is still happening with latest python packages of smartapi
                        smartapi-python==1.3.4

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