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

platformio failing with --ide eclipse #217

BluDotz opened this Issue May 26, 2015 · 1 comment


None yet
2 participants

BluDotz commented May 26, 2015

I am trying to create a project for use with the Eclipse IDE, and am using the command "platformio init --ide eclipse". However, this generates the following error output and the command comes to a grinding halt....

Error: Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/platformio/", line 75, in main
cli(None, None)
File "/Library/Python/2.7/site-packages/click/", line 664, in call
return self.main(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/click/", line 644, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/Library/Python/2.7/site-packages/click/", line 464, in invoke
return callback(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/platformio/commands/", line 90, in cli
File "/Library/Python/2.7/site-packages/platformio/ide/", line 81, in generate
File "/Library/Python/2.7/site-packages/platformio/ide/", line 87, in _render_tpl
return bottle.template(content, *_self._tplvars)
File "/usr/local/bin/", line 3596, in template
return TEMPLATES[tplid].render(kwargs)
File "/usr/local/bin/", line 3400, in render
self.execute(stdout, env)
File "/usr/local/bin/", line 3387, in execute
eval(, env)
File "", line 82, in
NameError: name 'env_name' is not defined

When I look at the files generated by the command, I find that a ".cproject" has been created, but not a ".project" file. Moreover, the ".cproject" file is completely empty.

My suspicion - having had a very quick look at the platformio code - is that either it has difficulties handling hidden files, or that there is problem during the substitution of the "project_name" parameter in the tpl files.

But you will know your code better than me, so you will probably get to the source of the problem quicker than me.

@ivankravets ivankravets added the bug label May 26, 2015

@ivankravets ivankravets added this to the 2.0.1 milestone May 26, 2015

@ivankravets ivankravets self-assigned this May 26, 2015


This comment has been minimized.


ivankravets commented May 26, 2015

Thanks for the report. I see this bug. The problem is caused by empty platformio.ini. You don't have any environments specified in it. You can use platformio init --ide eclipse --board HERE_BOARD_TYPE or define environments manually.

P.S: I'm going to fix it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment