<@U04S8PLJWMT> i.a.w.i.VersionedAirbyteStreamFact...
# ask-ai
r
@kapa.ai i.a.w.i.VersionedAirbyteStreamFactory(internalLog$io_airbyte_airbyte_commons_worker):245 - Caught exception that stops the processing of the jobs: dictionary update sequence element #0 has length 10; 2 is required. Traceback: Traceback (most recent call last): File "/home/airbyte/.pyenv/versions/3.10.18/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py", line 464, in create_and_get_completed_partitions self._update_jobs_status() File "/home/airbyte/.pyenv/versions/3.10.18/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/async_job/job_orchestrator.py", line 302, in _update_jobs_status self._job_repository.update_jobs_status(running_jobs) File "/home/airbyte/.pyenv/versions/3.10.18/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/requesters/http_job_repository.py", line 183, in update_jobs_status stream_slice = self._get_create_job_stream_slice(job) File "/home/airbyte/.pyenv/versions/3.10.18/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/requesters/http_job_repository.py", line 328, in _get_create_job_stream_slice "creation_response": self._get_creation_response_interpolation_context(job), File "/home/airbyte/.pyenv/versions/3.10.18/lib/python3.10/site-packages/airbyte_cdk/sources/declarative/requesters/http_job_repository.py", line 288, in _get_creation_response_interpolation_context creation_response_context = dict(self._create_job_response_by_id[job.api_job_id()].json()) ValueError: dictionary update sequence element #0 has length 10; 2 is required I am getting this error in connector builder
k
The error message you are seeing:
Copy code
ValueError: dictionary update sequence element #0 has length 10; 2 is required
indicates that there is an issue when converting the response from your job creation API call into a dictionary. Specifically, the code is trying to do:
Copy code
python dict(self._create_job_response_by_id[job.api_job_id()].json())
This error typically occurs when the
.json()
method returns a list of lists or a list of something other than key-value pairs, rather than a dictionary (i.e., a JSON object). The
dict()
constructor expects an iterable of key-value pairs (like a list of tuples or a dictionary), but it is receiving something else. What to check in your Connector Builder configuration: - Job Creation Response Format: Ensure that the API response for the job creation step is a JSON object (dictionary), not a list or another structure. For example, the response should look like:
Copy code
json   {     "id": "123",     "status": "pending"   }
and not like:
Copy code
json   [     ["id", "123"],     ["status", "pending"]   ]
or any other non-dictionary structure. - HTTP Response Format Setting: In the Creation tab, make sure you have selected the correct HTTP Response Format (usually JSON) for your API. If the API returns a different format (like CSV or XML), you need to adjust this setting accordingly. This is a common best practice and is highlighted in the documentation for asynchronous streams[Best Practices for Asynchronous Streams](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/async-streams#best-practices-for-asynchronous-streams). - API Endpoint and Response Validation: Use the "Other Requests" panel in the Connector Builder UI to inspect the actual response from your job creation request. Confirm that it matches the expected structure. Summary of steps to resolve: 1. Double-check the API response for the job creation step. 2. Ensure the response is a JSON object, not a list or other structure. 3. Verify your HTTP Response Format setting in the Creation tab. 4. Use the "Other Requests" panel to debug and inspect the actual API response. If the API you are working with does not return a JSON object, you may need to adjust your configuration or use a different extractor to parse the response correctly. If you continue to encounter issues, please provide a sample of the actual API response you are receiving, so further troubleshooting can be more specific. For more details on best practices and troubleshooting asynchronous streams, see the official documentation: [Best Practices for Asynchronous Streams](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/async-streams#best-practices-for-asynchronous-streams).