Page 1 of 1

PlatformIO Build/Compile Error New Install/Setup

Posted: 02 Mar 2019, 21:28
by mountainpitt
I have followed the instructions to install Platformio-IDE ATOM
Tutorial Install Platformio ... Platformio
Tutorial preparing to work with github ... ith_github
Tutorial building and uploading with platformio ... platformio

Pressing F7 then selecting PIO Build
The following errors for all the builds

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 440: ordinal not in range(128):
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\", line 169:
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\Script\", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\users\gethub\.platformio\platforms\espressif8266@src-e5a066500c9cb11856f3e2e1d0334f85\builder\", line 316:
target_elf = env.BuildProgram()
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\", line 224:
return self.method(*nargs, **kwargs)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\", line 107:
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\", line 224:
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\", line 224:
return self.method(*nargs, **kwargs)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\", line 189:
out_file = c.convert(ino_nodes)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\", line 52:
contents = self.merge(nodes)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\", line 74:
return "\n".join(["#include <Arduino.h>"] + lines) if lines else None

Processing normal_core_241_ESP8266_4096 (framework: arduino; platform: ... it#patch/v
1.7.3_Puya; board: esp12e)

[ERROR] Took 2.59 seconds

I have un installed and re installed several times and still getting same errors.
Have checked python from command prompt
Microsoft Windows [Version 10.0.17134.590]
(c) 2018 Microsoft Corporation. All rights reserved.

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

I am a new bee to this please help

Re: PlatformIO Build/Compile Error New Install/Setup

Posted: 10 Sep 2019, 01:11
by oarchie
I have just done the same install.
I started off with a fresh local github copy.
I installed VSCode
Installed the platformio extension
and loaded the platform.ini file.
I used the "env_default = normal_ESP8266_4M1M" to select the Wemos D1 R2 as my target after changing _4096 to _4M1M
Hit compile ... Same error as yours.
The problem was the version of Python.
I was on 3.6.2
It complains bitterly about SCons .. so I reinstalled/upgraded SCons
No luck - same result.

The way I got it to work:
Uninstall COMPLETELY python3.6.2
Install Python 2.7.16
Result: Happy days - all compiling correctly.

Not really a solution as Python 2.7 is at end of life.
But OK for now.

Re: PlatformIO Build/Compile Error New Install/Setup

Posted: 10 Sep 2019, 10:12
by TD-er
If it is just about making a build of your own and not really coding yourself, you may want to look at the tools/vagrant directory.
It is still a work in progress, but last night I added the option to define your own Custom.h file (copy from the included Custom-sample.h)

See also this topic: