{"record":{"id":"789497c8ed1dda38","repo":"pulumi/pulumi","slug":"unsupported-value-type-type-value-name-ex","errorCode":null,"errorMessage":"Unsupported value type: {type(value).__name__}. Expected one of: None, bool, float, str, Asset, Archive, Sequence, Mapping, ResourceReference, or Computed.","messagePattern":"Unsupported value type: (.+?)\\. Expected one of: None, bool, float, str, Asset, Archive, Sequence, Mapping, ResourceReference, or Computed\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"sdk/python/lib/pulumi/provider/experimental/property_value.py","lineNumber":131,"sourceCode":"        \"\"\"\n        :param value: The value of the property.\n        :param is_secret: Whether the value is secret.\n        :param dependencies: The dependencies of the property value.\n        \"\"\"\n        # Validate that value is a supported type.\n        if not (\n            value is None\n            or isinstance(value, bool)\n            or isinstance(value, float)\n            or isinstance(value, str)\n            or isinstance(value, pulumi.Asset)\n            or isinstance(value, pulumi.Archive)\n            or isinstance(value, Sequence)\n            or isinstance(value, Mapping)\n            or isinstance(value, ResourceReference)\n            or isinstance(value, Computed)\n        ):\n            raise TypeError(\n                f\"Unsupported value type: {type(value).__name__}. \"\n                f\"Expected one of: None, bool, float, str, Asset, Archive, Sequence, Mapping, ResourceReference, or Computed.\"\n            )\n\n        # Validate is_secret parameter.\n        if not isinstance(is_secret, bool):\n            raise TypeError(\n                f\"is_secret must be a bool, got {type(is_secret).__name__}.\"\n            )\n\n        # Validate dependencies parameter.\n        if dependencies is not None:\n            if not isinstance(dependencies, Iterable):\n                raise TypeError(\n                    f\"dependencies must be an Iterable[str] or None, got {type(dependencies).__name__}.\"\n                )\n            # Validate that all items in dependencies are strings.\n            for dep in dependencies:","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/python/lib/pulumi/provider/experimental/property_value.py#L113-L149","documentation":"A TypeError raised during input/output marshaling (property value serialization) when a value is not one of the supported primitive or structural Pulumi types: None, bool, float, str, Asset, Archive, Sequence, Mapping, ResourceReference, or Computed. The serializer cannot convert arbitrary Python objects to protocol values.","triggerScenarios":"Passing an unsupported Python object (set, bytes, custom class instance, int-wrapped Decimal, datetime) as a component input or property value that gets processed by the property-value serialization logic.","commonSituations":"Passing a set or bytes from Python code, datetime/date objects for timestamps instead of strings, numpy or Decimal numeric types, custom dataclasses not converted to Mappings.","solutions":["Convert the value to a supported type: use list(...) for sets, str(...) for datetimes, float(...) for Decimal, dict(...) for custom objects","Convert bytes to a base64 str or an Asset before passing","Only pass plain JSON-like structures (dict/list/str/num/bool/None) or Pulumi types (Asset/Archive/Computed/ResourceReference)","Fix the component schema so the property is typed for the structure you need (e.g. object type) instead of passing raw objects"],"exampleFix":"# before\nMyComponent(\"res\", {\"tags\": {\"a\", \"b\"}})  # set unsupported\n# after\nMyComponent(\"res\", {\"tags\": [\"a\", \"b\"]})","handlingStrategy":"type-guard","validationCode":"from typing import Sequence, Mapping\nimport pulumi\nSUPPORTED = (type(None), bool, float, str, pulumi.Asset, pulumi.Archive,\n             Sequence, Mapping, pulumi.ResourceReference, pulumi.Computed)\ndef check_supported(v) -> None:\n    if not isinstance(v, SUPPORTED):\n        raise TypeError(f\"unsupported type {type(v).__name__}\")","typeGuard":"def is_marshallable(v) -> bool:\n    return isinstance(v, (type(None), bool, float, str, pulumi.Asset,\n        pulumi.Archive, Sequence, Mapping, pulumi.ResourceReference, pulumi.Computed))","tryCatchPattern":"try:\n    make_property_value(value)\nexcept TypeError as e:\n    print(f\"convert {value!r} to a supported type: {e}\")\n    raise","preventionTips":["Restrict component inputs to JSON-like structures or Pulumi types","Convert sets -> list, datetime -> str/isoformat, Decimal -> float at boundaries","Document accepted input types on the component class"],"tags":["python","pulumi","serialization","type-error"],"backgroundTag":"unsupported-property-value-type","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}