Ron Braha
07/21/2023, 7:40 PMairbyte-python-sdk
and trying to use the streams/get_stream_properties
endpoint, but it crashes before returning the response.
From checking the get_stream_properties method with a debugger, I can see that the response is returned from the API request successfully, but crashes as soon as it tries to run the utils.unmarshall_json
method to normalize the response.
Here's the stack trace of your end:
File "/venv/lib/python3.11/site-packages/airbyte/streams.py", line 34, in get_stream_properties
out = utils.unmarshal_json(http_res.text, Optional[shared.StreamPropertiesResponse])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/airbyte/utils/utils.py", line 681, in unmarshal_json
out = unmarhsal.from_dict({"res": json_dict})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/api.py", line 72, in from_dict
return _decode_dataclass(cls, kvs, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 206, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 282, in _decode_generic
res = _decode_dataclass(type_arg, value, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 141, in _decode_dataclass
kvs = {decode_names.get(k, k): v for k, v in kvs.items()}
^^^^^^^^^
Exception Type: AttributeError at /v1/data-streams/
Exception Value: 'list' object has no attribute 'items'
I will add that the source_id
I used is of a file source (CSV), and the destination_id
I used is of a Snowflake destinationJon Tan (Airbyte)
07/21/2023, 7:42 PMRon Braha
07/21/2023, 7:44 PMJon Tan (Airbyte)
07/24/2023, 6:34 PMRon Braha
07/24/2023, 6:52 PMJon Tan (Airbyte)
07/27/2023, 6:29 PMRon Braha
07/27/2023, 6:33 PMRon Braha
08/03/2023, 3:17 PMJon Tan (Airbyte)
08/03/2023, 5:19 PMRon Braha
08/03/2023, 5:22 PMRon Braha
08/07/2023, 5:19 PMException Value: unable to unmarshal [{"streamName":"Phone numbers","syncModes":["full_refresh_append","full_refresh_overwrite"],"sourceDefinedCursorField":false,"propertyFields":[["name"],["phone_number"]]}] as typing.Optional[airbyte.models.shared.streampropertiesresponse.StreamPropertiesResponse]
Jon Tan (Airbyte)
08/07/2023, 6:34 PMRon Braha
08/07/2023, 6:40 PMJon Tan (Airbyte)
08/08/2023, 12:55 AMRon Braha
08/15/2023, 5:23 PMJon Tan (Airbyte)
08/17/2023, 4:47 PMRon Braha
08/17/2023, 6:44 PMunable to unmarshal [{"streamName":"Phone numbers api test","syncModes":["full_refresh_append","full_refresh_overwrite"],"sourceDefinedCursorField":false,"propertyFields":[["name"],["phone_number"]]}] as typing.Optional[airbyte.models.shared.streampropertiesresponse.StreamPropertiesResponse]
Stack Trace:
Traceback (most recent call last):
File "/venv/lib/python3.11/site-packages/airbyte/utils/utils.py", line 682, in unmarshal_json
out = unmarhsal.from_dict({"res": json_dict})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/api.py", line 70, in from_dict
return _decode_dataclass(cls, kvs, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 219, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 306, in _decode_generic
res = _decode_dataclass(type_arg, value, infer_missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/dataclasses_json/core.py", line 149, in _decode_dataclass
kvs = {decode_names.get(k, k): v for k, v in kvs.items()}
^^^^^^^^^
The above exception ('list' object has no attribute 'items') was the direct cause of the following exception:
File "/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
^^^^^^^^^
File "/venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The tested source and destination are File -> SnowflakeJon Tan (Airbyte)
08/17/2023, 6:50 PMRon Braha
08/17/2023, 7:01 PMJon Tan (Airbyte)
08/17/2023, 7:01 PM