Getting a weird error after updating Singer SDK – ...
# singer-tap-development
h
Getting a weird error after updating Singer SDK – has anyone else seen this before?
Copy code
time=2021-11-04 14:37:50 name=tap-blackbaud level=INFO message=tap-blackbaud v0.0.3, Meltano SDK v0.3.13)
 Traceback (most recent call last):
 File "/home/envs/blackbaud/bin/tap-blackbaud", line 8, in <module>
 sys.exit(cli())
 File "/home/envs/blackbaud/lib64/python3.7/site-packages/click/core.py", line 1128, in __call__
 return self.main(*args, **kwargs)
 File "/home/envs/blackbaud/lib64/python3.7/site-packages/click/core.py", line 1053, in main
 rv = self.invoke(ctx)
 File "/home/envs/blackbaud/lib64/python3.7/site-packages/click/core.py", line 1395, in invoke
 return ctx.invoke(self.callback, **ctx.params)
 File "/home/envs/blackbaud/lib64/python3.7/site-packages/click/core.py", line 754, in invoke
 return __callback(*args, **kwargs)
 File "/home/envs/blackbaud/lib64/python3.7/site-packages/singer_sdk/tap_base.py", line 463, in cli
 validate_config=validate_config,
 TypeError: __init__() got an unexpected keyword argument 'validate_config'
e
Hi @hassan_syyid. Are you using a custom constructor for your tap class?
h
Is there a param I’m failing to pass?
e
Ok, so you have to either 1. add
validate_config: bool = True
to the
__init__
signature and pass it to
super().__init__
2. or protect against future signature additions with
__init__(self, *args, **kwargs)
and
super().__init__(*args, **kwargs)
h
Oh I see – Thanks!
a
I'll add that we are shortly adding
prepare_tap()
which will give a stable and simple override point for setup operations. Resolve "Setup callback hook for base classes" (!194) · Merge requests · Meltano / Meltano SDK for Singer Taps and Targets · GitLab
cc @julian_knight who's build that feature
j
@aaronsteers I started a few discussions on that MR but I don’t have any more code to add at least at the moment
a
Yeah, not posting here to rush or anything, just for visibility. And I added a note about linting with the use case during prepare_ to initialize new attributes, as in Hassan's example.