- Is this your first time deploying Airbyte?: No
- OS Version / Instance: CentOS7
- Memory / Disk: 32Gb / 2 Tb
- Deployment: Are you using Docker or Kubernetes deployment? Yes
- Airbyte Version: latest
- Source name/version: python source
- Step: The issue is happening during creating the connection or a new source?
- Description:
Hi, I got an error when I runpython main.py discover
using the system generated python source generator. I used to follow the steps in the DOC successfully, but now it suddenly doesn’t work. These are my commands:
cd airbyte-integrations/connector-templates/generator
./generate.sh
cd …/…/connectors/source-test
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.py spec
python main.py check --config secrets/config.json
python main.py discover --config secrets/config.json
(.venv) [root@cent7 source-test]# python main.py discover --config secrets/config.json
{"type": "LOG", "log": {"level": "FATAL", "message": "1 validation error for AirbyteStream\nsupported_sync_modes\n field required (type=value_error.missing)\nTraceback (most recent call last):\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/main.py\", line 13, in <module>\n launch(source, sys.argv[1:])\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/.venv/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 123, in launch\n for message in source_entrypoint.run(parsed_args):\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/.venv/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 108, in run\n catalog = self.source.discover(self.logger, config)\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/source_test/source.py\", line 72, in discover\n streams.append(AirbyteStream(name=stream_name, json_schema=json_schema))\n File \"pydantic/main.py\", line 341, in pydantic.main.BaseModel.__init__\npydantic.error_wrappers.ValidationError: 1 validation error for AirbyteStream\nsupported_sync_modes\n field required (type=value_error.missing)"}}
{"type": "TRACE", "trace": {"type": "ERROR", "emitted_at": 1666170866546.541, "error": {"message": "Something went wrong in the connector. See the logs for more details.", "internal_message": "1 validation error for AirbyteStream\nsupported_sync_modes\n field required (type=value_error.missing)", "stack_trace": "Traceback (most recent call last):\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/main.py\", line 13, in <module>\n launch(source, sys.argv[1:])\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/.venv/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 123, in launch\n for message in source_entrypoint.run(parsed_args):\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/.venv/lib/python3.9/site-packages/airbyte_cdk/entrypoint.py\", line 108, in run\n catalog = self.source.discover(self.logger, config)\n File \"/home/airbyte/airbyte-integrations/connectors/source-test/source_test/source.py\", line 72, in discover\n streams.append(AirbyteStream(name=stream_name, json_schema=json_schema))\n File \"pydantic/main.py\", line 341, in pydantic.main.BaseModel.__init__\npydantic.error_wrappers.ValidationError: 1 validation error for AirbyteStream\nsupported_sync_modes\n field required (type=value_error.missing)\n", "failure_type": "system_error"}}}
When I changed the python env to the previous generator, the above commands all succeeded, but after building the docker image, I still have the same problem using the docker command to run.
What am I missing?
Thank you.