0

Python has stopped working.

Problem signature:

Problem Event Name: APPCRASH
  Application Name: python.exe
  Application Version:  3.8.10150.1013
  Application Timestamp:    608fe058
  Fault Module Name:    ig4icd32.dll
  Fault Module Version: 8.14.10.1930
  Fault Module Timestamp:   4aba6fc2
  Exception Code:   c0000005
  Exception Offset: 002095ed
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    16393
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

This is the problem details I get on the crash.

here is the code I am trying to do.

import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *


class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.browser = QWebEngineView()
        self.browser.setUrl(QUrl('http://google.com'))
        self.setCentralWidget(self.browser)
        self.showMaximized()

        # navbar
        navbar = QToolBar()
        self.addToolBar(navbar)

        back_btn = QAction('Back', self)
        back_btn.triggered.connect(self.browser.back)
        navbar.addAction(back_btn)

        forward_btn = QAction('Forward', self)
        forward_btn.triggered.connect(self.browser.forward)
        navbar.addAction(forward_btn)

        reload_btn = QAction('Reload', self)
        reload_btn.triggered.connect(self.browser.reload)
        navbar.addAction(reload_btn)

        home_btn = QAction('Home', self)
        home_btn.triggered.connect(self.navigate_home)
        navbar.addAction(home_btn)

        self.url_bar = QLineEdit()
        self.url_bar.returnPressed.connect(self.navigate_to_url)
        navbar.addWidget(self.url_bar)

        self.browser.urlChanged.connect(self.update_url)

    def navigate_home(self):
        self.browser.setUrl(QUrl('http://google.com'))

    def navigate_to_url(self):
        url = self.url_bar.text()
        self.browser.setUrl(QUrl(url))

    def update_url(self, q):
        self.url_bar.setText(q.toString())


app = QApplication(sys.argv)
QApplication.setApplicationName('Lunar Browser')
window = MainWindow()
app.exec_()
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • 1
    Did you install the PyQtWebEngine package? It's normally *not* included in the standard PyQt package. Run the program from the command prompt and see if it reports something. If it's about the missing module, see https://stackoverflow.com/q/51154871, otherwise [edit] your question with that output, as the Window Debug information is almost useless. – musicamante Sep 26 '21 at 09:36
  • @musicamante yes i did install it, its coming requirement satisfied. – BeastXFaheem Sep 29 '21 at 08:21

0 Answers0