Skip to content

config import fails when using V2 scaffolding #370

@pjbull

Description

@pjbull

At:
https://github.com/drivendataorg/cookiecutter-data-science/blob/master/%7B%7B%20cookiecutter.repo_name%20%7D%7D/%7B%7B%20cookiecutter.module_name%20%7D%7D/__init__.py#L1

Should be from {{ cookiecutter.module_name }} import config # noqa: F401


Discussed in #369

Originally posted by wrighteap May 27, 2024
Hi!

New cookiecutter user here. I just tried using your new v2 release.

I created a project project, repo repo and module module, using the code scaffold option. I selected conda as my environment manager, and requirements.txt for my dependency file.

pip list shows the package module installed at /path/to/repo. When I try to import module, I get a ModuleNotFoundError: No module named 'config', due to the import config under module/init.py -- Is this a design choice to invite me to add /path/to/repo/module to sys path or to modify the config directly?

Sorry in advance if the question is inane or lacking in detail - happy to be told so or asked for additional information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions