{"record":{"id":"48ce148d0584a44f","repo":"D4Vinci/Scrapling","slug":"you-have-to-pass-something-to-search-with-like-ta","errorCode":null,"errorMessage":"You have to pass something to search with, like tag name(s), tag attributes, or both.","messagePattern":"You have to pass something to search with, like tag name\\(s\\), tag attributes, or both\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"scrapling/parser.py","lineNumber":711,"sourceCode":"        ) as e:\n            raise SelectorSyntaxError(f\"Invalid XPath selector: {selector}\") from e\n\n    def find_all(\n        self,\n        *args: str | Iterable[str] | Pattern | Callable | Dict[str, str],\n        **kwargs: str,\n    ) -> \"Selectors\":\n        \"\"\"Find elements by filters of your creations for ease.\n\n        :param args: Tag name(s), iterable of tag names, regex patterns, function, or a dictionary of elements' attributes. Leave empty for selecting all.\n        :param kwargs: The attributes you want to filter elements based on it.\n        :return: The `Selectors` object of the elements or empty list\n        \"\"\"\n        if self._is_text_node(self._root):\n            return Selectors()\n\n        if not args and not kwargs:\n            raise TypeError(\"You have to pass something to search with, like tag name(s), tag attributes, or both.\")\n\n        attributes: Dict[str, Any] = dict()\n        tags: Set[str] = set()\n        patterns: Set[Pattern] = set()\n        results, functions, selectors = Selectors(), [], []\n\n        # Brace yourself for a wonderful journey!\n        for arg in args:\n            if isinstance(arg, str):\n                tags.add(arg)\n\n            elif type(arg) in (list, tuple, set):\n                arg = cast(Iterable, arg)  # Type narrowing for type checkers like pyright\n                if not all(map(lambda x: isinstance(x, str), arg)):\n                    raise TypeError(\"Nested Iterables are not accepted, only iterables of tag names are accepted\")\n                tags.update(set(arg))\n\n            elif isinstance(arg, dict):","sourceCodeStart":693,"sourceCodeEnd":729,"githubUrl":"https://github.com/D4Vinci/Scrapling/blob/5d213a2d4764002bfc4fed33c32fe09fa8b0bf7f/scrapling/parser.py#L693-L729","documentation":"find_all() requires at least one filter argument. Unlike BeautifulSoup's find_all(), calling it completely empty is treated as a programmer error and raises TypeError instead of silently returning every element in the tree.","triggerScenarios":"Calling selector.find_all() with no positional args and no kwargs — e.g. a wrapper function forwards an empty filter set: selector.find_all(*filters) where filters == [].","commonSituations":"Translating BeautifulSoup code that used find_all() to grab everything; generic helper functions that build filter lists dynamically and occasionally end up empty.","solutions":["Pass an explicit catch-all: find_all('*') selects all elements.","If the args are built dynamically, default them: find_all(*(tags or ['*'])).","Reconsider whether you actually wanted all elements — iterating children directly (page.children) is usually clearer."],"exampleFix":"# before\nselector.find_all()  # TypeError\n\n# after\nselector.find_all('*')","handlingStrategy":"validation","validationCode":"filters = [f for f in built_filters if f]\nresults = selector.find_all(*(filters or ['*']))  # never call with zero args","typeGuard":null,"tryCatchPattern":"try:\n    results = selector.find_all(*args)\nexcept TypeError as e:\n    if 'pass something to search with' in str(e):\n        results = selector.find_all('*')\n    else:\n        raise","preventionTips":["Treat empty filter lists as explicit 'all': default to ['*'] when building args dynamically.","Do not assume BeautifulSoup semantics — scrapling's find_all() never means 'select everything' when called bare."],"tags":["find-all","validation","api-misuse"],"backgroundTag":null,"analyzedSha":"5d213a2d4764002bfc4fed33c32fe09fa8b0bf7f","analyzedAt":"2026-08-14T22:23:09.440Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}