{"record":{"id":"a46a7ca62fb51964","repo":"boto/boto3","slug":"problem-renaming-self-name-category-to-name","errorCode":null,"errorMessage":"Problem renaming {self.name} {category} to {name}!","messagePattern":"Problem renaming (.+?) (.+?) to (.+?)!","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"boto3/resources/model.py","lineNumber":376,"sourceCode":"        :type name: string\n        :param name: The original name of the value.\n        :type category: string\n        :param category: The value type, such as 'identifier' or 'action'\n        :type snake_case: bool\n        :param snake_case: True (default) if the name should be snake cased.\n        \"\"\"\n        if snake_case:\n            name = xform_name(name)\n\n        if name in names:\n            logger.debug('Renaming %s %s %s', self.name, category, name)\n            self._renamed[(category, name)] = f\"{name}_{category}\"\n            name += f\"_{category}\"\n\n            if name in names:\n                # This isn't good, let's raise instead of trying to keep\n                # renaming this value.\n                raise ValueError(\n                    f'Problem renaming {self.name} {category} to {name}!'\n                )\n\n        names.add(name)\n\n    def _get_name(self, category, name, snake_case=True):\n        \"\"\"\n        Get a possibly renamed value given a category and name. This\n        uses the rename map set up in ``load_rename_map``, so that\n        method must be called once first.\n\n        :type category: string\n        :param category: The value type, such as 'identifier' or 'action'\n        :type name: string\n        :param name: The original name of the value\n        :type snake_case: bool\n        :param snake_case: True (default) if the name should be snake cased.\n        :rtype: string","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/boto/boto3/blob/6e10b029c1326a437932a8b24f38af69fd986e15/boto3/resources/model.py#L358-L394","documentation":"When loading a resource model, boto3 renames members to avoid collisions (snake-casing, reserved word handling). load_rename_map appends '_{category}' to a colliding name; if the suffixed name is STILL in the used-names set, it gives up and raises ValueError('Problem renaming {self.name} {category} to {name}!'). This indicates a name in the service model that the renamer cannot disambiguate.","triggerScenarios":"Loading a service resource model whose members produce an unresolvable name collision after two rename passes. Typically surfaced at import/client-creation time for an affected service/version.","commonSituations":"Upgrading botocore to a version with a model that exposes a collision; rarely user-facing except as an import error.","solutions":["Upgrade boto3 and botocore to the latest version where the model has been corrected.","If reproducible on a custom/patched model, rename one of the colliding members in the model JSON.","Report the collision to botocore maintainers with the service and member names."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    session.resource('service-name')\nexcept ValueError as e:\n    if 'Problem renaming' in str(e):\n        import boto3, botocore\n        raise RuntimeError(f'boto3 {boto3.__version__} / botocore {botocore.__version__} '\n                           f'has a model rename collision: {e}') from e\n    raise","preventionTips":["Keep boto3 and botocore versions aligned and current.","Pin known-good version pairs in requirements.","Avoid editing service model JSON unless you also update the renamer."],"tags":["resources","model","rename","boto3","botocore"],"backgroundTag":null,"analyzedSha":"6e10b029c1326a437932a8b24f38af69fd986e15","analyzedAt":"2026-08-11T20:52:47.213Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}