Code Monkey home page Code Monkey logo

Comments (2)

krishnavelu avatar krishnavelu commented on July 22, 2024

This is fixed now by #9

from alice_blue.

munivoltarc avatar munivoltarc commented on July 22, 2024

Hi, ran the code of connection for WebSocket given by yours as it is but it is giving this following error please solve the issue immediately please:
STAGE 1: Invalidate the previous session : Ok
STAGE 2: Create the new session : Ok
Connecting to Socket ...

AttributeError Traceback (most recent call last)
Cell In[5], line 44
40 LTP = feed_message[
41 'lp'] if 'lp' in feed_message else LTP # If LTP in the response it will store in LTP variable
43 # Socket Connection Request
---> 44 alice.start_websocket(socket_open_callback=socket_open, socket_close_callback=socket_close,
45 socket_error_callback=socket_error, subscription_callback=feed_data, run_in_background=True,market_depth=False)
47 while not socket_opened:
48 pass

File ~\AppData\Roaming\Python\Python311\site-packages\pya3\alicebluepy.py:802, in Aliceblue.start_websocket(self, socket_open_callback, socket_close_callback, socket_error_callback, subscription_callback, check_subscription_callback, run_in_background, market_depth)
800 print("Connecting to Socket ...")
801 self.__stop_event = threading.Event()
--> 802 websocket.enableTrace(False)
803 self.ws = websocket.WebSocketApp(self._sub_urls['base_url_socket'],
804 on_open=self.on_open,
805 on_message=self.on_message,
806 on_close=self.on_close,
807 on_error=self.on_error)
809 # if run_in_background:
810 # print("Running background!")
811 # self.__ws_thread = threading.Thread(target=self.__ws_run_forever())
(...)
819 # except Exception as e:
820 # print("Error:",e)

AttributeError: module 'websocket' has no attribute 'enableTrace'

from alice_blue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.