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

dummy module error #173

Open
mate-dravucz opened this issue Jun 21, 2023 · 2 comments
Open

dummy module error #173

mate-dravucz opened this issue Jun 21, 2023 · 2 comments

Comments

@mate-dravucz
Copy link

Hi,

I am trying to generate a new project and I selected these options:
Rest API
No database
No CI/CD
Add dummy model
Add example routers
Adds traefik labels to docker container

I am getting an error since the dummy module is missing. Am I doing something wrong? I tried running it with Docker too same exception. Great project btw.

Mac Ventura 13.3
Python 3.11.4
Poetry (version 1.5.1)
fastapi==0.97.0
fastapi-template==4.1.5

Error:

Check with Flake8........................................................Passed
Validate types with MyPy.................................................Failed
- hook id: mypy
- exit code: 1

deriv_project/web/api/router.py:3: error: Module "deriv_project.web.api" has no
attribute "dummy"  [attr-defined]
    from deriv_project.web.api import dummy, echo, monitoring
    ^
Found 1 error in 1 file (checked 18 source files)

Check python ast.........................................................Passed
Trim Trailing Whitespace.................................................Passed
Check Toml...............................................................Passed
Fix End of Files.........................................................Passed
Add trailing commas......................................................Passed
Pretty format YAML.......................................................Passed
Format with Black........................................................Passed
autoflake................................................................Passed
isort....................................................................Passed
Check with Flake8........................................................Passed
Validate types with MyPy.................................................Failed
- hook id: mypy
- exit code: 1

deriv_project/web/api/router.py:3: error: Module "deriv_project.web.api" has no
attribute "dummy"  [attr-defined]
    from deriv_project.web.api import dummy, echo, monitoring
    ^
Found 1 error in 1 file (checked 18 source files)

Project successfully generated. You can read information about usage in README.md
@s3rius
Copy link
Owner

s3rius commented Jun 22, 2023

Wow. We'll fix it. Can you please send me fastapi-template.options from your pyproject.toml?

@mate-dravucz
Copy link
Author

Thanks,

[fastapi-template.options]
project_name = "test123"
api_type = "rest"
enable_redis = "None"
enable_rmq = "None"
ci_type = "none"
enable_migrations = "None"
enable_taskiq = "None"
enable_kube = "None"
kube_name = "test123"
enable_routers = "True"
enable_kafka = "True"
enable_loguru = "None"
traefik_labels = "None"
add_dummy = "True"
orm = "none"
self_hosted_swagger = "None"
prometheus_enabled = "None"
sentry_enabled = "None"
otlp_enabled = "None"

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