arduino/Arduino · warning · AttributeError

no such move, %r

Error message

no such move, %r

What it means

six.remove_move(name) removes a name from six's MovedItems/moves mapping and raises AttributeError('no such move, %r') when the name is not registered — neither as an attribute of _MovedItems nor as a key in moves.__dict__. This API exists for third parties to undo specific moves and only fails when given an unknown or already-removed name.

Source

Thrown at arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/packages/six.py:202

del attr

moves = sys.modules[__name__ + ".moves"] = _MovedItems("moves")


def add_move(move):
    """Add an item to six.moves."""
    setattr(_MovedItems, move.name, move)


def remove_move(name):
    """Remove item from six.moves."""
    try:
        delattr(_MovedItems, name)
    except AttributeError:
        try:
            del moves.__dict__[name]
        except KeyError:
            raise AttributeError("no such move, %r" % (name,))


if PY3:
    _meth_func = "__func__"
    _meth_self = "__self__"

    _func_code = "__code__"
    _func_defaults = "__defaults__"

    _iterkeys = "keys"
    _itervalues = "values"
    _iteritems = "items"
else:
    _meth_func = "im_func"
    _meth_self = "im_self"

    _func_code = "func_code"
    _func_defaults = "func_defaults"

View on GitHub (pinned to a0df6e0e83)

Solutions

  1. Verify the name first: `if hasattr(six.moves, name): six.remove_move(name)`.
  2. Wrap in try/except AttributeError and treat absence as success.
  3. Check six.__version__ to confirm the move exists in your installed six.

Example fix

// before
six.remove_move('zip')
// after
if hasattr(six.moves, 'zip'):
    six.remove_move('zip')
Defensive patterns

Strategy: try-catch

Validate before calling

if not hasattr(six.moves, name):
    return  # nothing to remove

Type guard

def move_exists(name):
    return hasattr(six._MovedItems, name) or name in six.moves.__dict__

Try / catch

try:
    six.remove_move(name)
except AttributeError:
    pass  # move already removed or never existed

Prevention

When it happens

Trigger: Calling six.remove_move('name_not_in_six'); calling remove_move twice for the same name; passing names that exist only on a different six version's move map.

Common situations: Compatibility shims uninstalling six moves that were already removed; copy-pasted cleanup code referencing a misspelled move name; six version differences between environments.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of arduino/Arduino@a0df6e0e83 (2026-09-06). Data as JSON: /api/errors/891acaea75b04492. Report an issue: GitHub.