def __setitem__(self, name, value):
        name = self._valid_cookie_name(name)
        if not isinstance(value, string_types):
            raise ValueError(value, 'cookie value must be a string')
        if not isinstance(value, text_type):
            try:
                value = text_(value, 'utf-8')
            except __HOLE__:
                raise ValueError(
                    value, 'cookie value must be utf-8 binary or unicode')
        self._mutate_header(name, value)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/webob-1.2.3/webob/cookies.py/RequestCookies.__setitem__