Custom python source--Error while "check"

Hi Team, Trying to build a python connector using airbyte_cdk.
getting bellow error during the “check” step.

command: python main.py check --config secrets/config.json

Output:

{“type”: “LOG”, “log”: {“level”: “FATAL”, “message”: “‘list’ object has no attribute ‘items’\nTraceback (most recent call last):\n File "main.py", line 13, in \n launch(source, sys.argv[1:])\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/entrypoint.py", line 127, in launch\n for message in source_entrypoint.run(parsed_args):\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/entrypoint.py", line 91, in run\n config_secrets = get_secrets(self.source, config, self.logger)\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/utils/airbyte_secrets_utils.py", line 16, in get_secrets\n flattened_key_values = all_key_pairs_dot_notation(source.spec(logger).connectionSpecification.get("properties", {}))\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/utils/mapping_utils.py", line 26, in all_key_pairs_dot_notation\n return {k: v for k, v in _all_key_pairs_dot_notation(dict_obj)}\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/utils/mapping_utils.py", line 26, in \n return {k: v for k, v in _all_key_pairs_dot_notation(dict_obj)}\n File "/home/sheshan/Documents/Airbyte/airbyte/airbyte-integrations/connectors/source-custom-snowflake/.venv/lib/python3.8/site-packages/airbyte_cdk/utils/mapping_utils.py", line 16, in _all_key_pairs_dot_notation\n for key, value in _dict_obj.items():\nAttributeError: ‘list’ object has no attribute ‘items’”}}

Seems the launch (launch(source, sys.argv[1:]) function in main.py giving this error.
Can you please help?

details:
“airbyte-cdk~=0.1.53”
Airbyte version= VERSION=0.40.0-alpha

Thanks

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

Hi @Sheshan,

I’m noticing that your python version is 3.8. Can you please upgrade to a python version 3.9 or greater and try running the commands again?

Let me know what the results are.

Hi @sajarin , The issue was with the spec file I defined. I defined “properties” as a list and dict is right format as per documentation.
But the weird part is I didn’t face issue while **

python main.py spec

**

This should have been caught during spec check itself.
But Now im good.Thanks for the response.

Hey @Sheshan,

Glad to hear that it’s working now. Hopefully this helps other users as well. Feel free to post more questions here in the forums.