lightweight-charts-python icon indicating copy to clipboard operation
lightweight-charts-python copied to clipboard

[BUG] The PyQt6 implementation is not working

Open axalon opened this issue 1 year ago • 0 comments

Expected Behavior

When using the demo code provided in the documentation at https://lightweight-charts-python.readthedocs.io/en/latest/examples/gui_examples.html

I adjusted PyQt5 to PyQt6 in the following code from the documentation above:

import pandas as pd
from PyQt6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget

from lightweight_charts.widgets import QtChart

app = QApplication([])
window = QMainWindow()
layout = QVBoxLayout()
widget = QWidget()
widget.setLayout(layout)

window.resize(800, 500)
layout.setContentsMargins(0, 0, 0, 0)

chart = QtChart(widget)

df = pd.read_csv('ohlcv.csv')
chart.set(df)

layout.addWidget(chart.get_webview())

window.setCentralWidget(widget)
window.show()

app.exec_()

Current Behaviour

When I run the above code I get the following error:

ModuleNotFoundError: QWebEngineView was not found, and must be installed to use QtChart.

so I did pip install QWebEngineView

after that I now receive the error:

ImportError: DLL load failed while importing QtWebEngineWidgets: The specified procedure could not be found.

Reproducible Example

You can copy the code from above and try run it

Environment

- OS: Windows 11
- Library:2.0.1

axalon avatar Aug 07 '24 20:08 axalon