Working on building a new `tap-workato` with the S...
# singer-tap-development
j
Working on building a new
tap-workato
with the SDK. When I run the out-of-the box pytests I get
Copy code
tap_workato/tests/test_core.py:7: in <module>
    from tap_workato.tap import TapWorkato
tap_workato/tap.py:8: in <module>
    from tap_workato.streams import (
tap_workato/streams.py:82: in <module>
    class RecipesStream(WorkatoStream):
tap_workato/streams.py:116: in RecipesStream
    th.ArrayType
../../../Library/Caches/pypoetry/virtualenvs/tap-workato-T66zip44-py3.7/lib/python3.7/site-packages/singer_sdk/typing.py:94: in to_dict
    return cast(dict, self.type_dict)
../../../Library/Caches/pypoetry/virtualenvs/tap-workato-T66zip44-py3.7/lib/python3.7/site-packages/singer_sdk/typing.py:374: in type_dict
    merged_props.update(w.to_dict())
../../../Library/Caches/pypoetry/virtualenvs/tap-workato-T66zip44-py3.7/lib/python3.7/site-packages/singer_sdk/typing.py:338: in to_dict
    type_dict = append_type(type_dict, "null")
../../../Library/Caches/pypoetry/virtualenvs/tap-workato-T66zip44-py3.7/lib/python3.7/site-packages/singer_sdk/helpers/_typing.py:38: in append_type
    if "anyOf" in result:
E   TypeError: argument of type 'property' is not iterable
Seems to be choking on this particular property in the PropertiesList in the stream:
Copy code
th.Property(
            "config",
            th.ArrayType(
                th.ObjectType(
                    th.Property("keyword", th.StringType),
                    th.Property("name", th.StringType),
                    th.Property("provider", th.StringType),
                    th.Property("skip_validation", th.BooleanType),
                    th.Property("account_id", th.IntegerType),
                )
            ),
        ),
I’ve had this exact sort of structure in other taps that work just fine so I’m really confused on how I’m getting this error …
nevermind. I just discovered that the property that was giving me problems was the one I described above instead it was a property that was an array where I forget to describe the type of the contents in the array. I had this:
Copy code
th.Property("parameters_schema", th.ArrayType),
but it should have been something like this:
Copy code
th.Property("parameters_schema", th.ArrayType(th.StringType)),
e
Thanks for reporting @josh_lloyd! I've popped an issue and MR to produce better exception messages when the wrapped type should be instantiated. Let me know what you think simple smile
j
lovin’ it. Gave it the ol’ thumbs up.
a
Thanks for raising, @josh_lloyd! Agreed error message improvements would be much appreciated. Thanks, @edgar_ramirez_mondragon for creating the MR.