{"record":{"id":"95e3de99d59cf9d8","repo":"MemPalace/mempalace","slug":"collection-name-is-required","errorCode":null,"errorMessage":"collection_name is required","messagePattern":"collection_name is required","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/qdrant.py","lineNumber":1396,"sourceCode":"\n    @staticmethod\n    def _normalize_args(args, kwargs):\n        if \"palace\" in kwargs:\n            palace = kwargs.pop(\"palace\")\n            if not isinstance(palace, PalaceRef):\n                raise TypeError(\"palace= must be a PalaceRef instance\")\n            collection_name = kwargs.pop(\"collection_name\")\n            create = bool(kwargs.pop(\"create\", False))\n            options = kwargs.pop(\"options\", None)\n            if args or kwargs:\n                raise TypeError(\"unexpected arguments to get_collection\")\n            return palace, collection_name, create, options\n        if args:\n            palace_path = args[0]\n            rest = list(args[1:])\n            collection_name = kwargs.pop(\"collection_name\", None) or (rest.pop(0) if rest else None)\n            if collection_name is None:\n                raise TypeError(\"collection_name is required\")\n            create = kwargs.pop(\"create\", False)\n            if rest:\n                create = rest.pop(0)\n            options = kwargs.pop(\"options\", None)\n            if rest or kwargs:\n                raise TypeError(\"unexpected arguments to get_collection\")\n            return (\n                PalaceRef(id=palace_path, local_path=palace_path),\n                collection_name,\n                bool(create),\n                options,\n            )\n        if \"palace_path\" in kwargs:\n            palace_path = kwargs.pop(\"palace_path\")\n            collection_name = kwargs.pop(\"collection_name\")\n            create = bool(kwargs.pop(\"create\", False))\n            options = kwargs.pop(\"options\", None)\n            if kwargs:","sourceCodeStart":1378,"sourceCodeEnd":1414,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/qdrant.py#L1378-L1414","documentation":"A TypeError from get_collection's positional form: the first positional arg was consumed as palace_path, but no collection name could be found — neither a second positional argument nor a collection_name= keyword.","triggerScenarios":"get_collection(\"/palace\") or get_collection(\"/palace\", create=True) — the second positional was meant as the name but is missing, or create=True was passed positionally where the name should be, leaving collection_name None.","commonSituations":"Refactoring a call and dropping the name argument; passing create as the second positional while forgetting the name; typo like collection_nm= in kwargs so pop('collection_name') misses.","solutions":["Supply the collection name: get_collection(\"/palace\", \"drawers\") or collection_name=\"drawers\"","If passing create positionally, it must come after the name: get_collection(path, name, True)","Check kwargs spelling (collection_name, not name/collection)"],"exampleFix":"# before\nbackend.get_collection(\"/data/palace\", create=True)\n# after\nbackend.get_collection(\"/data/palace\", \"drawers\", create=True)","handlingStrategy":"validation","validationCode":"def open_collection(backend, palace_path: str, name: str, create: bool = False):\n    assert name, \"collection_name is required\"\n    return backend.get_collection(palace_path, name, create)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make collection_name a required parameter of your wrapper functions","Lint for get_collection calls with fewer than 2 positionals"],"tags":["qdrant","api-misuse","typeerror","missing-argument"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}