How to fix: TypeError: filter expected 2 arguments, got 1
How to fix: TypeError: filter expected 2 arguments, got 1 Question: I am making a browser using python and PyQt5/PySide6. I implemented an adblock which uses a list to block ads from opening as tabs. ` class WebPage(QWebEnginePage): adblocker = filter(open(os.path.join("build files", "adlist.txt"), encoding="utf8")) def __init__(self, parent=None): super().__init__(parent) def acceptNavigationRequest(self, url, _type, isMainFrame): urlString = …