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

Generating new project doesn't work #353

Open
rynkowsg opened this issue Jun 26, 2016 · 1 comment
Open

Generating new project doesn't work #353

rynkowsg opened this issue Jun 26, 2016 · 1 comment

Comments

@rynkowsg
Copy link

I tried to generate new project using coco2d-x v3 (35beef) and it doesn't work.

$ cocos new MyGame -p com.MyCompany.MyGame -l cpp
Loading .bash_profile
Loading .bashrc
Traceback (most recent call last):
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 992, in <module>
    run_plugin(command, argv, plugins)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/bin/cocos.py", line 916, in run_plugin
    plugin.run(argv, dependencies_objects)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/plugins/plugin_new/project_new.py", line 258, in run
    self.parse_args(argv)
  File "/Users/g.rynkowski/src/cocos2d-x/tools/cocos2d-console/plugins/plugin_new/project_new.py", line 140, in parse_args
    if args.list_templates:
AttributeError: 'Namespace' object has no attribute 'list_templates'

On the other hand, it works when I checked out cocos2d-x v3.12 (26fb643).

v3 uses cocos2d-console with HEAD: 08e776c, and
v3.12 uses cocos2d-console with HEAD: 04ade20

Between them are only two commits:

$ git log --oneline 04ade20..08e776c
08e776c Merge pull request #352 from ricardoquesada/disable_gui_templates
32511e9 disable cocos gui and --list-templates

Obviously, 32511e9 causes that issue.

@AscenX
Copy link

AscenX commented Jun 28, 2016

I got the same problem with you and I saw some updates in project_new.py.
They commented some code,

#        if args.list_templates:
#            print(json.dumps(Templates.list(self.get_templates_paths())))
#            sys.exit(0)

but it doesn't work,still some wrong


  File "/Users/Ascen/Desktop/develop/cocos2d-x/tools/cocos2d-console/plugins/plugin_new/project_new.py", line 78, in init
    if args.template_name:
AttributeError: 'Namespace' object has no attribute 'template_name'

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