You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used this library(version 1.0.22) 6 months ago but now my codes that worked that time doesn't work. I have several separate functions that I am sure they worked but now they doesn't work now. I check this by versions of 1.0.22, 2.0.1, and 2.1.0. The only thing that changed since 6 month ago, I changed my operation system from Ubuntu 22.04 to Ubuntu 24.04
The code is very easy and I used ohlcv.csv in example folder of this repository. I want to show all the candles and then start from first candle and add some text to that candle. I got this error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/../ml/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/../ml/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/../ml/lib/python3.10/site-packages/lightweight_charts/chart.py", line 94, in loop
raise JavascriptException(f"\n\nscript -> '{arg}',\nerror -> {msg['name']}[{msg['line']}:{msg['column']}]\n{msg['message']}")
webview.errors.JavascriptException:
I know if I change the line chart.set(df1) to chart.set(df1[0:1]) to make sure chart._last_bar is correct, the problem would be solve but the problem is that in that situation I cannot see all the candles.
Question
I used this library(version 1.0.22) 6 months ago but now my codes that worked that time doesn't work. I have several separate functions that I am sure they worked but now they doesn't work now. I check this by versions of 1.0.22, 2.0.1, and 2.1.0. The only thing that changed since 6 month ago, I changed my operation system from Ubuntu 22.04 to Ubuntu 24.04
The code is very easy and I used ohlcv.csv in example folder of this repository. I want to show all the candles and then start from first candle and add some text to that candle. I got this error:
Exception in thread Thread-2 (loop):
Traceback (most recent call last):
File "/../ml/lib/python3.10/site-packages/lightweight_charts/chart.py", line 89, in loop
window.evaluate_js(arg)
File "/../ml/lib/python3.10/site-packages/webview/window.py", line 48, in wrapper
return function(self, *args, **kwargs)
File "/../ml/lib/python3.10/site-packages/webview/window.py", line 459, in evaluate_js
raise JavascriptException(result)
webview.errors.JavascriptException: {'name': 'Error', 'message': 'Cannot update oldest data, last time=[object Object], new time=[object Object]', 'line': 7, 'column': 147441, 'sourceURL': 'http://127.0.0.1:16789/lightweight-charts.js', 'stack': 'Lb@http://127.0.0.1:16789/lightweight-charts.js:7:147441\ntw@http://127.0.0.1:16789/lightweight-charts.js:7:158601\nupdate@http://127.0.0.1:16789/lightweight-charts.js:7:153502\neval code@\neval@[native code]\nglobal code@http://127.0.0.1:16789/test.html:4:33'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/../ml/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/../ml/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/../ml/lib/python3.10/site-packages/lightweight_charts/chart.py", line 94, in loop
raise JavascriptException(f"\n\nscript -> '{arg}',\nerror -> {msg['name']}[{msg['line']}:{msg['column']}]\n{msg['message']}")
webview.errors.JavascriptException:
script -> 'window.qsygphzs.series.update({
"Unnamed: 0": 0,
"time": 1277769600.0,
"open": 1.2667,
"high": 1.6667,
"low": 1.1693,
"close": 1.5927,
"volume": 277519500.0
})',
error -> Error[7:147441]
Cannot update oldest data, last time=[object Object], new time=[object Object]
I know if I change the line chart.set(df1) to chart.set(df1[0:1]) to make sure chart._last_bar is correct, the problem would be solve but the problem is that in that situation I cannot see all the candles.
Code example
The text was updated successfully, but these errors were encountered: