我已经成功安装了lwcpip install lightweight_charts
我在这一行下面得到这个错误,请告知:from lightweight_charts import Chart
Traceback (most recent call last):
File "c:\Users\naveen\Downloads\Telegram Desktop\strat-0.29.py", line 14, in <module>
from lightweight_charts import Chart
File "C:\Users\naveen\AppData\Roaming\Python\Python39\site-packages\lightweight_charts\__init__.py", line 1, in <module>
from .chart import Chart
File "C:\Users\naveen\AppData\Roaming\Python\Python39\site-packages\lightweight_charts\chart.py", line
8, in <module>
from lightweight_charts.pywebview import _loop
File "C:\Users\naveen\AppData\Roaming\Python\Python39\site-packages\lightweight_charts\pywebview.py", line 6, in <module>
from lightweight_charts.js import LWC
File "C:\Users\naveen\AppData\Roaming\Python\Python39\site-packages\lightweight_charts\js.py", line 47, in <module>
class LWC:
File "C:\Users\naveen\AppData\Roaming\Python\Python39\site-packages\lightweight_charts\js.py", line 528, in LWC
width: float = 0.5, height: float = 0.5, sync: bool | UUID = False):
TypeError: unsupported operand type(s) for |: 'type' and 'type'
2条答案
按热度按时间pbpqsu0x1#
尝试将python升级到v3.10
gfttwv5a2#
您可能需要升级Python。
对于
python 3.10
来说效果很好。git官方页面说
3.9+
:错误的相关链接:https://github.com/tiangolo/typer/issues/371
git链接:https://github.com/louisnw01/lightweight-charts-python