happydasch / btplotting

btplotting provides plotting for backtests, optimization results and live data from backtrader.
GNU General Public License v3.0
338 stars 84 forks source link

500:Internal Server Error #50

Closed arronqing closed 1 year ago

arronqing commented 1 year ago

When using btplotting for online data visualization, a 500: Internal Server Error error is reported, and the error code is as follows:

HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "C:\Python\python3.8.9\lib\site-packages\tornado\web.py", line 1786, in _execute result = await result File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\server\views\doc_handler.py", line 54, in get session = await self.get_session() File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\server\views\session_handler.py", line 145, in get_session session = await self.application_context.create_session_if_needed(session_id, self.request, token) File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\server\contexts.py", line 242, in create_session_if_needed self._application.initialize_document(doc) File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\application\application.py", line 192, in initialize_document h.modify_document(doc) File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\application\handlers\function.py", line 142, in modify_document self._func(doc) File "C:\Python\python3.8.9\lib\site-packages\btplotting-0.2.1-py3.8.egg\btplotting\webapp.py", line 54, in make_document model = self._model_factory_fnc(doc) File "C:\Python\python3.8.9\lib\site-packages\btplotting-0.2.1-py3.8.egg\btplotting\analyzers\plot.py", line 64, in _app_cb_build_root_model client = LiveClient(doc, File "C:\Python\python3.8.9\lib\site-packages\btplotting-0.2.1-py3.8.egg\btplotting\live\client.py", line 55, in init self.model, self._refresh_fnc = self._createmodel() File "C:\Python\python3.8.9\lib\site-packages\btplotting-0.2.1-py3.8.egg\btplotting\live\client.py", line 177, in _createmodel tabs = Tabs( File "C:\Python\python3.8.9\lib\site-packages\bokeh-3.2.0.dev1-py3.8.egg\bokeh\model\model.py", line 97, in new raise ValueError("'id' cannot be used together with property initializers") ValueError: 'id' cannot be used together with property initializers

Tried python 3.8.9, 3.8.6, but it didn't work Use btplotting version 0.2.1

zgpnuaa commented 1 year ago

Did you find the cause of the problem when trading in live mode? @arronqing

happydasch commented 1 year ago

Will close this in favor of #46