You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/main.py", line 75, in main
cli(None, None)
File "/Library/Python/2.7/site-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/platformio/commands/init.py", line 90, in cli
pg.generate()
File "/Library/Python/2.7/site-packages/platformio/ide/projectgenerator.py", line 81, in generate
f.write(self._render_tpl(tpl_path).encode("utf8"))
File "/Library/Python/2.7/site-packages/platformio/ide/projectgenerator.py", line 87, in _render_tpl
return bottle.template(content, *_self._tplvars)
File "/usr/local/bin/bottle.py", line 3596, in template
return TEMPLATES[tplid].render(kwargs)
File "/usr/local/bin/bottle.py", line 3400, in render
self.execute(stdout, env)
File "/usr/local/bin/bottle.py", line 3387, in execute
eval(self.co, 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.
The text was updated successfully, but these errors were encountered:
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.
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/main.py", line 75, in main
cli(None, None)
File "/Library/Python/2.7/site-packages/click/core.py", line 664, in call
return self.main(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/Library/Python/2.7/site-packages/click/core.py", line 464, in invoke
return callback(_args, *_kwargs)
File "/Library/Python/2.7/site-packages/platformio/commands/init.py", line 90, in cli
pg.generate()
File "/Library/Python/2.7/site-packages/platformio/ide/projectgenerator.py", line 81, in generate
f.write(self._render_tpl(tpl_path).encode("utf8"))
File "/Library/Python/2.7/site-packages/platformio/ide/projectgenerator.py", line 87, in _render_tpl
return bottle.template(content, *_self._tplvars)
File "/usr/local/bin/bottle.py", line 3596, in template
return TEMPLATES[tplid].render(kwargs)
File "/usr/local/bin/bottle.py", line 3400, in render
self.execute(stdout, env)
File "/usr/local/bin/bottle.py", line 3387, in execute
eval(self.co, 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.
The text was updated successfully, but these errors were encountered: