broad-doctor-18421
03/12/2024, 4:42 PMAssertionError: Unexpected type; expected a value of type `typing.Sequence[pulumi_aws.ec2.nat_gateway.NatGateway]` but got a value of type `<class 'dict'>` at resource `test-vpc_image`, property `nat_gateways`: {'strategy': 'None'}
Even though my test is empty.
Reproducible with this repo: https://github.com/brettswift/pulumi_awsx_vpc_test
Python is giving me error messages that don't make sense.
Is anyone able to have a look and tell me if it's a simple issue? We've been fighting this problem for a while.hundreds-gpu-71155
03/12/2024, 4:45 PMdict
isn't a Sequence
hundreds-gpu-71155
03/12/2024, 4:45 PMSequence
is like a list
or tuple
, where you have collection of items that's ordered and indexablehundreds-gpu-71155
03/12/2024, 4:46 PMmy_dict[1]
wouldn't get you the second item, it would get you item at key 1
hundreds-gpu-71155
03/12/2024, 4:47 PMdict
in place of a NatGateway
(allowed sometimes*) and forgot to wrap it in []
hundreds-gpu-71155
03/12/2024, 4:48 PMhundreds-gpu-71155
03/12/2024, 4:49 PMSequence
to Mapping
on https://docs.python.org/3/library/collections.abc.htmlbroad-doctor-18421
03/12/2024, 5:32 PMtyping.Sequence
- it's internal to pulumi.broad-doctor-18421
03/12/2024, 5:32 PMbroad-doctor-18421
03/12/2024, 5:33 PMhundreds-gpu-71155
03/12/2024, 5:33 PMhundreds-gpu-71155
03/12/2024, 5:33 PMSequence
directly, you generally use list
or tuple
. and the error is that it was expecting a Sequence and didn't get onebroad-doctor-18421
03/12/2024, 5:33 PMbroad-doctor-18421
03/12/2024, 5:34 PMtyping.Sequence
bug.broad-doctor-18421
03/12/2024, 5:34 PMbroad-doctor-18421
03/12/2024, 5:35 PMbroad-doctor-18421
03/12/2024, 5:35 PMhundreds-gpu-71155
03/12/2024, 5:35 PMhundreds-gpu-71155
03/12/2024, 5:35 PM[]
around the callhundreds-gpu-71155
03/12/2024, 5:36 PMVpc
disagrees with thathundreds-gpu-71155
03/12/2024, 5:36 PMbroad-doctor-18421
03/12/2024, 5:37 PMbroad-doctor-18421
03/12/2024, 5:38 PMhundreds-gpu-71155
03/12/2024, 5:38 PMhundreds-gpu-71155
03/12/2024, 5:39 PMbroad-doctor-18421
03/12/2024, 5:40 PM