{"record":{"id":"5ef6dd2704cfa38e","repo":"sqlmapproject/sqlmap","slug":"serialization-of-type-s-is-not-supported","errorCode":null,"errorMessage":"serialization of type '%s' is not supported","messagePattern":"serialization of type '(.+?)' is not supported","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"lib/core/convert.py","lineNumber":154,"sourceCode":"\n    if isinstance(value, datetime.timedelta):\n        return {_SERIALIZE_TAG: \"td\", \"v\": [value.days, value.seconds, value.microseconds]}\n\n    name = \"%s.%s\" % (value.__class__.__module__, value.__class__.__name__)\n    if name in _SERIALIZE_CLASSES:\n        return {_SERIALIZE_TAG: \"o\", \"c\": name, \"s\": _serializeEncode(dict(value.__dict__))}\n\n    return _serializeUnknown(value, name)\n\ndef _serializeUnknown(value, name):\n    \"\"\"\n    Fallback for a type not explicitly handled by the serializer\n    \"\"\"\n\n    # sqlmap's own (or bundled) classes MUST be added to the allowlist explicitly - fail loudly\n    # (caught by the regression tests) rather than silently store something that cannot be restored\n    if (name or \"\").split(\".\")[0] in (\"lib\", \"plugins\", \"thirdparty\"):\n        raise TypeError(\"serialization of type '%s' is not supported\" % name)\n\n    # a foreign/exotic scalar (e.g. an unusual DB-driver value): degrade to its textual form rather\n    # than crash a user's session - session values are only ever rendered (getUnicode) downstream\n    singleTimeWarnMessage(\"serializing value of unsupported type '%s' as text\" % name)\n    return getUnicode(value)\n\ndef _serializeDecode(struct):\n    \"\"\"\n    Restores a Python value from a JSON-deserialized (tagged) structure\n    \"\"\"\n\n    if struct is None or isinstance(struct, bool) or isinstance(struct, float) or isinstance(struct, six.integer_types):\n        return struct\n\n    if isinstance(struct, six.text_type):\n        return struct\n\n    if isinstance(struct, six.binary_type):  # defensive - json.loads() yields text, not bytes","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/convert.py#L136-L172","documentation":"Error \"serialization of type '%s' is not supported\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/convert.py:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}