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

Creating a cookiecutter mesa model by running mesa startproject fails #1606

Closed
freinhard opened this issue Mar 5, 2023 · 5 comments · Fixed by #1611
Closed

Creating a cookiecutter mesa model by running mesa startproject fails #1606

freinhard opened this issue Mar 5, 2023 · 5 comments · Fixed by #1611

Comments

@freinhard
Copy link

Describe the bug
I tried to start a new mesa project using mesa startproject

Expected behavior
A mesa project should be added.

To Reproduce

(env) > $ mesa startproject                                                                                                 
project [Example Project]: Test
snake [test]: test
camel [Test]: Test
agent [TestAgent]: TestAgent
model [TestModel]: TestModel
description [Example short description of the project]: Test description

Traceback (most recent call last):
  File "/usr/local/bin/cookiecutter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/cookiecutter/cli.py", line 194, in main
    cookiecutter(
  File "/usr/local/lib/python3.10/site-packages/cookiecutter/main.py", line 114, in cookiecutter
    result = generate_files(
  File "/usr/local/lib/python3.10/site-packages/cookiecutter/generate.py", line 281, in generate_files
    template_dir = find_template(repo_dir)
  File "/usr/local/lib/python3.10/site-packages/cookiecutter/find.py", line 31, in find_template
    raise NonTemplatedInputDirException
cookiecutter.exceptions.NonTemplatedInputDirException
@rht
Copy link
Contributor

rht commented Mar 6, 2023

I can't reproduce the problem. What is the Mesa version you have? Have you made sure that you are on the latest version of Mesa (make sure to check your current version before updating)?

@freinhard
Copy link
Author

Thanks @rht!

(env) > $ pip show mesa                                                        
Name: Mesa
Version: 1.1.1
Summary: Agent-based modeling (ABM) in Python 3+
Home-page: https://github.com/projectmesa/mesa
Author: Project Mesa Team
Author-email: projectmesa@googlegroups.com
License: Apache 2.0
Location: /usr/local/lib/python3.10/site-packages
Requires: click, cookiecutter, networkx, numpy, pandas, tornado, tqdm
Required-by: 

@rht
Copy link
Contributor

rht commented Mar 13, 2023

I finally reproduced the problem in the latest release. It works on my machine because I did pip install -e . instead of pip install .

This PR should fix it: #1611. I have tested this on my machine.

Earlier attempt was: a8c889e. But it looks like it worked in the past, but no longer work in the present.

@jackiekazil @tpike3 should we release 1.2.1 for this?

@jackiekazil
Copy link
Member

We could do that.

@freinhard
Copy link
Author

Thanks! 😀

@jackiekazil jackiekazil mentioned this issue Mar 13, 2023
3 tasks
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.

3 participants