Cc_path not defined error on pio init

I’m getting an error ‘cc_path is not defined’ when I am trying to do a platformio init for a nano.

> pio init --board nanoatmega328 --ide clion

The current working directory /media/TheWild/Chiquita/Devel/Arduino/SSD1306_tes$ will be used for project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.

The next files/directories have been created in /media/TheWild/Chiquita/Devel/A$duino/SSD1306_test
platformio.ini - Project Configuration File
src - Put your source files here
lib - Put here project specific (private) libraries
Error: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/platformio/", line 10$, in main
    cli(None, None, None)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 680, in main    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 1027[22/406]oke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 508, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 16, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/platformio/commands/", line 103, in cli
  File "/usr/local/lib/python2.7/dist-packages/platformio/ide/", line 121, in generate
  File "/usr/local/lib/python2.7/dist-packages/platformio/ide/", line 127, in _render_tpl
    return bottle.template(content, **self._tplvars)
  File "/usr/local/bin/", line 3619, in template
    return TEMPLATES[tplid].render(kwargs)
  File "/usr/local/bin/", line 3409, in render
    self.execute(stdout, env)
  File "/usr/local/bin/", line 3396, in execute
    eval(, env)
  File "<string>", line 4, in <module>
NameError: name 'cc_path' is not defined


An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section

* Report this problem to the developers


It seems to do it on all three of my platforms so I’m not sure what is wrong or missing.

OK, figured it out - I was trying to get it to add my regular arduino libraries in a platformio.ini line and must have had a syntax error in it somewhere.

It’s now working with this at the top of the file:

env_default = nanoatmega328
lib_extra_dirs = /media/TheWild/Chiquita/Devel/Arduino/libraries

lib_deps_builtin =

Not sure what was wrong when I did it the first time.