Navigation

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

    smartWebSocketV2:304] Error occurred during WebSocket connection: WebSocketApp.run_forever()

    Python SDK
    0
    11
    75
    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
      ashigro last edited by

      [E 240226 09:00:36 smartWebSocketV2:304] Error occurred during WebSocket connection: WebSocketApp.run_forever() got an unexpected keyword argument 'ping_payload'
      Exception in thread Thread-8 (feed):
      Traceback (most recent call last):
      File "C:\Users\ashig\anaconda3\envs\trader-env\lib\threading.py", line 1016, in _bootstrap_inner
      self.run()
      File "C:\Users\ashig\anaconda3\envs\trader-env\lib\threading.py", line 953, in run
      self._target(*self._args, **self._kwargs)
      File "C:\Users\ashig\AppData\Local\Temp\ipykernel_11200\1613896697.py", line 325, in feed
      File "C:\Users\ashig\anaconda3\envs\trader-env\lib\site-packages\SmartApi\smartWebSocketV2.py", line 305, in connect
      raise e
      File "C:\Users\ashig\anaconda3\envs\trader-env\lib\site-packages\SmartApi\smartWebSocketV2.py", line 301, in connect
      self.wsapp.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}, ping_interval=self.HEART_BEAT_INTERVAL,
      TypeError: WebSocketApp.run_forever() got an unexpected keyword argument 'ping_payload'

      A M 2 Replies Last reply Reply Quote 1
      • A
        ashigro @ashigro last edited by

        @admin Please help

        P 1 Reply Last reply Reply Quote 0
        • V
          vijayyande last edited by

          me too getting similar error

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

            Getting the Same issue

            V 1 Reply Last reply Reply Quote 0
            • M
              Moderator_1 @ashigro last edited by

              Hello @ashigro, @abhisingh1891 , @vijayyande ,

              We have stopped non secure websocket for SmartAPI. It was scheduled for 30th November 2023.
              Websocket URL Change

              Please make the requisite changes as directed in the linked post and it should be working.
              Apologies for the inconvenience.

              Regards
              SmartAPi Team

              V A 3 Replies Last reply Reply Quote -1
              • P
                poorna @ashigro last edited by

                @ashigro @vijayyande @abhisingh1891 @Moderator_1 @admin noted the message, pls GitHub url, I can refer the code

                A 1 Reply Last reply Reply Quote 0
                • V
                  vijipalani @Moderator_1 last edited by

                  @Moderator_1 Thank you

                  1 Reply Last reply Reply Quote 1
                  • A
                    ashigro @Moderator_1 last edited by

                    @Moderator_1 I am using latest version 1.2.5 of SmartApi-python package. Is there anything else I need to do. Strangley, same code is working fine in google colab environment.

                    Could it be something to do with bug/issue with version of other package(s)?

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

                      @Moderator_1 Resolved the issue by using version numbers of dependencies mentioned in git repo. It seems there is some conflict with updated versions of any of the dependency packages.

                      Following requirements listed in requirements_dev.txt helped:
                      attrs==23.1.0
                      autobahn==23.6.2
                      Automat==22.10.0
                      certifi==2023.5.7
                      cffi==1.15.1
                      charset-normalizer==3.1.0
                      constantly==15.1.0
                      cryptography==41.0.5
                      hyperlink==21.0.0
                      idna==3.4
                      incremental==22.10.0
                      isodate==0.6.1
                      logzero==1.7.0
                      pycparser==2.21
                      pyotp==2.8.0
                      pyparsing==3.1.0
                      python-dateutil==2.8.2
                      pytz==2023.3
                      rdflib==6.3.2
                      rdflib-jsonld==0.6.2
                      requests==2.31.0
                      simplejson==3.19.1
                      six==1.16.0
                      Twisted==22.10.0
                      txaio==23.1.1
                      typing_extensions==4.6.3
                      urllib3==2.0.3
                      websocket-client==1.6.0
                      zope.interface==6.0

                      1 Reply Last reply Reply Quote 0
                      • V
                        vishalk @abhisingh1891 last edited by

                        @abhisingh1891 change websocket url it works

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

                          @poorna https://github.com/angel-one/smartapi-python

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