settings-doc icon indicating copy to clipboard operation
settings-doc copied to clipboard

Fix module/class not found error

Open pradishb opened this issue 6 months ago • 0 comments

When following the docs,

settings-doc generate --class src.settings.AppSettings --output-format markdown
Usage: settings-doc generate [OPTIONS]
Try 'settings-doc generate --help' for help.

Error: Invalid value for '--class' / '-c': Cannot read the settings class: No module named 'src'

Folder structure:

.
└── src/
    ├── __init__.py
    └── settings.py

settings.py

from pydantic_settings import BaseSettings


class AppSettings(BaseSettings):
  logging_level: str

pradishb avatar Jun 12 '25 05:06 pradishb