alpacahq / Momentum-Trading-Example

An example algorithm for a momentum-based day trading strategy.
657 stars 218 forks source link

Error: This event loop is already running #2

Closed CruddyShad0w closed 5 years ago

CruddyShad0w commented 5 years ago

I only edited the file with my Alpaca paper credentials.

When I run the program in jupyter notebooks I get the error Fatal Python error: Cannot recover from stack overflow. The error orrcurs in the code segment while error handling and executing the command run_ws(conn,channels) # Handle failed websocket connections by reconnecting def run_ws(conn, channels): try: conn.run(channels) except Exception as e: print(e) conn.close run_ws(conn, channels) Does anyone know how to fix this loop bug?

CruddyShad0w commented 5 years ago

This was an issue running the program within Jupyter Notebooks. Issue did not persist in console mode.