Python - PyCharm WebScrapping - ERROR Process finished with exit code -1073741819 (0xC0000005)

Stack Overflow Asked by Paul Martínez Llerena on October 8, 2020

Can you help with this Project. My code is right but my for loop break in the second iteration, it should be 10 iterations. I try different options to solve this issue but none solve the problem.

import time
import bs4 as bs
import urllib.request
import sys
from PyQt5.QtWebEngineWidgets import QWebEnginePage
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QUrl

class Page(QWebEnginePage):
    def __init__(self, url): = QApplication(sys.argv)
        self.html = ''

    def _on_load_finished(self):
        self.html = self.toHtml(self.Callable)
        print('Load finished')

    def Callable(self, html_str):
        self.html = html_str

def main():
    A = [
        [1, "", "soup.find_all('strong')[0].text", "soup.find_all('strong')[1].text"],
        [2, "", "soup.find('label', {'id':'idFormPrincipal:j_idt20'}).text",
         "soup.find('label', {'id':'idFormPrincipal:j_idt17'}).text"],
        [3, "", "soup.find_all('span',{'style':'color:#FFFFFF;'})[4].text",
        [4, "", "soup.find('strong',{'id':'valcompra'}).text",
        [5, "", "soup.find_all('span',{'class':'bold'})[1].text[8:13]",
        [6, "",
        [7, "", "soup.find('span',{'id':'compra'}).text",
        [8, "", "soup.find_all('span')[11].text", "soup.find_all('span')[16].text"],
        [9, "", "soup.find('span',{'id':'current_bid'}).text[3:9]",
        [10, "", "soup.find('span',{'id':'fxrate_buy_text'}).text",


    for elem in A:
        page = Page(elem[1])
        soup = bs.BeautifulSoup(page.html, 'html.parser')
        compra = eval(elem[2])
        venta = eval(elem[3])
        print(compra, venta, sep="-")

if __name__ == '__main__': main()

My code only does two iterations and then break. It should be 10 iterations
My output is:

C:Pythonpython.exe C:/Users/OK/PycharmProjects/Prueba/
Load finished
Load finished

Process finished with exit code -1073741819 (0xC0000005)

One example of the answer is:

Load finished
Load finished
Load finished
Load finished
Load finished
Load finished
Load finished
Load finished
Load finished
Load finished

enter image description here

My characteristics are:

Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:01:55) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Thank you so much

Add your own answers!

Related Questions

how to use the “SPI_SETMOUSETRAILS” Parameters

1  Asked on November 27, 2021 by mingy


Detect pairs after simple frequency

2  Asked on November 27, 2021


Mailchimp API limit in post request

1  Asked on November 27, 2021


Python subprocess.check_output() for general shell command

1  Asked on November 27, 2021 by user13977273


Ajax returns GET request instead of POST

3  Asked on November 24, 2021 by zexar221


SIGABRT on std::ifstream close

1  Asked on November 24, 2021 by c0d3-m4513r


Python while loop counter ignores limit

2  Asked on November 24, 2021 by sh12030


Can’t access Pandas

2  Asked on November 24, 2021 by sash


HTML CSS style: hiding an HTML container and its HTML child controls

1  Asked on November 24, 2021 by deveric69


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP