

def output(self, key, obj):
    try:
        data = to_marshallable_type(obj)
        endpoint = (self.endpoint if (self.endpoint is not None) else request.endpoint)
        o = urlparse(url_for(endpoint, _external=self.absolute, **data))
        if self.absolute:
            scheme = (self.scheme if (self.scheme is not None) else o.scheme)
            return urlunparse((scheme, o.netloc, o.path, '', '', ''))
        return urlunparse(('', '', o.path, '', '', ''))
    except TypeError as te:
        raise MarshallingException(scheme)

dataset/ETHPy150Open flask-restful/flask-restful/flask_restful/fields.py Url.output/VarMisuse@147/164 `te`->`scheme`