Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The run_database_init.py returns error #206

Closed
gotochkin opened this issue Feb 7, 2024 · 1 comment
Closed

The run_database_init.py returns error #206

gotochkin opened this issue Feb 7, 2024 · 1 comment
Assignees

Comments

@gotochkin
Copy link

gotochkin commented Feb 7, 2024

Here is the error:

Traceback (most recent call last):
File "/home/gleb/genai-databases-retrieval-app/retrieval_service/run_database_init.py", line 39, in
asyncio.run(main())
File "/home/gleb/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/gleb/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gleb/.pyenv/versions/3.11.6/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/gleb/genai-databases-retrieval-app/retrieval_service/run_database_init.py", line 27, in main
cfg = parse_config("config.yml")
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gleb/genai-databases-retrieval-app/retrieval_service/app/app.py", line 41, in parse_config
return AppConfig(**config)
^^^^^^^^^^^^^^^^^^^
File "/home/gleb/.pyenv/versions/3.11.6/lib/python3.11/site-packages/pydantic/main.py", line 164, in init
pydantic_self.pydantic_validator.validate_python(data, self_instance=pydantic_self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for AppConfig
clientId
Field required [type=missing, input_value={'host': '0.0.0.0', 'data...': 'ShittyPassword01#'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.5/v/missing

It seems clientId parameter is missing in the config.yml template. It was stated as an optional but the parse_config cannot really skip it if it is present in the class AppConfig

Can we please fix it? I am getting complains from users trying to execute codelab and qwiklab.
Thanks,
Gleb

@duwenxin99
Copy link
Contributor

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants