https://pulumi.com logo
#python
Title
# python
h

hallowed-beach-15050

08/30/2020, 6:38 AM
Copy code
raise AssertionError(f"Unexpected type. Expected 'list' got '{typ}'")
    AssertionError: Unexpected type. Expected 'list' got '<class 'str'>'
m

microscopic-pilot-97530

08/31/2020, 3:36 PM
Sorry for the trouble, @hallowed-beach-15050. We added some extra type checks in the Python SDK in v2.9.0, which mistakenly errors when some internal values are returned from the engine during previews. The issue has been addressed in https://github.com/pulumi/pulumi/pull/5251 and should be released soon. In the meantime you can pin to earlier versions of the
pulumi
and
pulumi-aws
packages:
pulumi
2.8.2
and
pulumi-aws
3.1.0
.
h

hallowed-beach-15050

08/31/2020, 3:37 PM
I ended up doing essentially that this weekend.
thanks for confirming that you are aware of the issue
m

microscopic-pilot-97530

08/31/2020, 7:08 PM
The fix has been released in version
2.9.2
of the
pulumi
package, which will work with
pulumi-aws
version
3.2.1
.
h

hallowed-beach-15050

08/31/2020, 9:11 PM
👍 will try and give that a look
hmmm… I am still seeing the issue. Is there a ticket tracking this that I can add feedback to?
specifically when specifying
thresholds={"critical": 500, "warning": 250},
on a Monitor resource in datadog.
m

microscopic-pilot-97530

09/02/2020, 5:51 PM
This looks like a bug in the Datadog provider. The same issue happens in C# programs, it’s just now showing up in Python due to the type checks that were added. During previews,
thresholds
is coming back as a list containing a map, but it is expected to be just a map. I’ve opened https://github.com/pulumi/pulumi-datadog/issues/73 and am looking into it.
12 Views