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

config import fails when using V2 scaffolding #370

Closed
pjbull opened this issue May 28, 2024 Discussed in #369 · 2 comments · Fixed by #372
Closed

config import fails when using V2 scaffolding #370

pjbull opened this issue May 28, 2024 Discussed in #369 · 2 comments · Fixed by #372

Comments

@pjbull
Copy link
Member

pjbull commented May 28, 2024

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.

@pjbull
Copy link
Member Author

pjbull commented May 30, 2024

@wrighteap This should be fixed now. Would you mind testing for your use case? Make sure that when cookiecutter asks to re-clone the repo, you say yes so you get the latest.

@wrighteap
Copy link

wrighteap commented Jun 29, 2024

@pjbull Hi. Sorry, clearly late on this. Using your latest version and things work as expected. Thank you very much!

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

Successfully merging a pull request may close this issue.

2 participants