votes up 1

'mappingproxy' object does not support item assignment

Package:
attrs
github stars 3636
Exception Class:
TypeError

Raise code

adOnlyDict(IterableUserDict):
        """
        Best-effort read-only dict wrapper.
        """

        def __setitem__(self, key, val):
            # We gently pretend we're a Python 3 mappingproxy.
            raise TypeError(
                "'mappingproxy' object does not support item assignment"
            )

        def update(self, _):
            # We gently pretend we're a Python 3 mappingproxy.
            raise AttributeError(
                "'mappingproxy' object has no attribute 'update'"

Comment explaining raise

We gently pretend we're a Python 3 mappingproxy.

😲 Agile task management is now easier than calling a taxi. #Tracklify

NO FIXES YET

Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix