boto/boto3 · error · ValueError

Problem renaming {self.name} {category} to {name}!

Error message

Problem renaming {self.name} {category} to {name}!

What it means

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.

Source

Thrown at boto3/resources/model.py:376

        :type name: string
        :param name: The original name of the value.
        :type category: string
        :param category: The value type, such as 'identifier' or 'action'
        :type snake_case: bool
        :param snake_case: True (default) if the name should be snake cased.
        """
        if snake_case:
            name = xform_name(name)

        if name in names:
            logger.debug('Renaming %s %s %s', self.name, category, name)
            self._renamed[(category, name)] = f"{name}_{category}"
            name += f"_{category}"

            if name in names:
                # This isn't good, let's raise instead of trying to keep
                # renaming this value.
                raise ValueError(
                    f'Problem renaming {self.name} {category} to {name}!'
                )

        names.add(name)

    def _get_name(self, category, name, snake_case=True):
        """
        Get a possibly renamed value given a category and name. This
        uses the rename map set up in ``load_rename_map``, so that
        method must be called once first.

        :type category: string
        :param category: The value type, such as 'identifier' or 'action'
        :type name: string
        :param name: The original name of the value
        :type snake_case: bool
        :param snake_case: True (default) if the name should be snake cased.
        :rtype: string

View on GitHub (pinned to 6e10b029c1)

Solutions

  1. Upgrade boto3 and botocore to the latest version where the model has been corrected.
  2. If reproducible on a custom/patched model, rename one of the colliding members in the model JSON.
  3. Report the collision to botocore maintainers with the service and member names.
Defensive patterns

Strategy: retry

Try / catch

try:
    session.resource('service-name')
except ValueError as e:
    if 'Problem renaming' in str(e):
        import boto3, botocore
        raise RuntimeError(f'boto3 {boto3.__version__} / botocore {botocore.__version__} '
                           f'has a model rename collision: {e}') from e
    raise

Prevention

When it happens

Trigger: 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.

Common situations: Upgrading botocore to a version with a model that exposes a collision; rarely user-facing except as an import error.

Related errors


AI-assisted analysis of boto/boto3@6e10b029c1 (2026-08-11). Data as JSON: /api/errors/a46a7ca62fb51964. Report an issue: GitHub.