pynest 中的“断言错误:未找到 settings.yaml 文件”

问题描述 投票:0回答:1

我面临以下问题:

File "/home/rugain/Documents/repos/sap_integration_api/.venv/lib/python3.12/site-packages/nest/cli/click_handlers.py", line 63, in create_nest_module
    db_type, is_async = get_metadata()
                        ^^^^^^^^^^^^^^
  File "/home/rugain/Documents/repos/sap_integration_api/.venv/lib/python3.12/site-packages/nest/cli/click_handlers.py", line 8, in get_metadata
    assert setting_path.exists(), "settings.yaml file not found"
AssertionError: settings.yaml file not found

运行以下命令时:

pynest g module -n <any-module-name>
python fastapi
1个回答
0
投票

该文件用于配置nest服务器。
我们称之为 pynest_settings.yaml

config:
    db_type: null
    is_async: false

如果您正在努力解决这个问题,请使用以下命令:

cp pynest_settings.yaml <your_env>/lib/<your-python-version>/site-packages/nest/settings.yaml
© www.soinside.com 2019 - 2024. All rights reserved.