-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live trading ploting got some issuse #46
Comments
yes, the live client does not work at th moment. any patches are welcome. |
+1 |
1 similar comment
+1 |
+1 |
made a quick fix: |
Ima hang on here. So far, i beat down the LiveClient Class to stop all this madness. But, im a bit clueless, as im getting now nonstop;
And im a bit lost, why and how. Im feeding 1sec candles, havent tested other bigger timeframes yet. Here is the LiveClient; https://gist.github.com/itsXactlY/915f610145b8c2f486fb309d91526f49 Any input is much appreciated, as the live plot wont draw newest incoming data. |
ColumnDataSource's columns still exist, but not my beer. Only wanted live plots. |
Uncaught exception GET / (::1) HTTPServerRequest(protocol='http', host='localhost', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\tornado\web.py", line 1713, in _execute result = await result File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\server\views\doc_handler.py", line 52, in get session = await self.get_session() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\server\views\session_handler.py", line 120, in get_session session = await self.application_context.create_session_if_needed(session_id, self.request, token) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\server\contexts.py", line 218, in create_session_if_needed self._application.initialize_document(doc) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\application\application.py", line 171, in initialize_document h.modify_document(doc) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\application\handlers\function.py", line 132, in modify_document self._func(doc) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\webapp.py", line 54, in make_document model = self._model_factory_fnc(doc) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\analyzers\plot.py", line 64, in _app_cb_build_root_model client = LiveClient(doc, File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\live\client.py", line 56, in __init__ self.refreshmodel() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\live\client.py", line 255, in refreshmodel self._datahandler = LiveDataHandler(self) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\live\datahandler.py", line 22, in __init__ self._fill() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\live\datahandler.py", line 96, in _fill df = app.get_data(figid=figid, back=lookback) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\app.py", line 448, in get_data dt_idx = data_clock.get_dt_list(startidx, endidx) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\clock.py", line 214, in get_dt_list val = bt.num2date(val, tz=None if not localized else self._tz) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\backtrader\utils\dateintern.py", line 165, in num2date ix = int(x) ValueError: cannot convert float NaN to integer
and
WARNING:bokeh.server.views.ws:Failed sending message as connection was closed Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x000001578A5C6A00>>, <Task finished name='Task-10353' coro=<_needs_document_lock.<locals>._needs_document_lock_wrapper() done, defined at C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\server\session.py:51> exception=KeyError('index')>) Traceback (most recent call last): File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\tornado\ioloop.py", line 740, in _run_callback ret = callback() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\tornado\ioloop.py", line 764, in _discard_future_result future.result() File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\bokeh\server\session.py", line 71, in _needs_document_lock_wrapper result = await result File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\tornado\gen.py", line 216, in wrapper result = ctx_run(func, *args, **kwargs) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\live\datahandler.py", line 42, in _cb_push p_data, s_data = fp.get_cds_patchdata_from_series(idx, patch) File "C:\Users\Four\AppData\Local\Programs\Python\Python39\lib\site-packages\btplotting\cds.py", line 166, in get_cds_patchdata_from_series idx_map = {d: idx for idx, d in enumerate(self._cds.data['index'])} KeyError: 'index'
someone help me fix it
The text was updated successfully, but these errors were encountered: