Skip to content
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

Getting black screen with error message in background "js:Uncaught TypeError: Cannot read property 'callback' of undefined #499

Open
SurinderDev opened this issue Dec 18, 2024 · 4 comments

Comments

@SurinderDev
Copy link

Question

Getting black screen with error message in background "js:Uncaught TypeError: Cannot read property 'callback' of undefined
I am using python version 3.11.9

Code example

import pandas as pd
from PyQt5.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)

data = [
            {"time": "2024-01-01", "open": 100, "high": 110, "low": 90, "close": 105},
            {"time": "2024-01-02", "open": 105, "high": 115, "low": 95, "close": 110},
            {"time": "2024-01-03", "open": 110, "high": 120, "low": 100, "close": 115},
        ]
df = pd.DataFrame(data)

# Set the data in the chart
chart.set(df)

layout.addWidget(chart.get_webview())

window.setCentralWidget(widget)
window.show()

app.exec()
@yeongchani
Copy link

yeongchani commented Dec 28, 2024

Exactly same error. Somtimes it works but the error occured by just declaring QtChart.

@yeongchani
Copy link

Exactly same error. Somtimes it works but the error occured by just declaring QtChart.

After an error occured, all of additional function stopped works.

@SurinderDev
Copy link
Author

Can some one please look into it

@louisnw01
Copy link
Owner

Hi,

I'm unable to reproduce with that example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants