PlatformIO Build/Compile Error New Install/Setup

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Normal user
Posts: 1
Joined: 15 Feb 2019, 01:35

PlatformIO Build/Compile Error New Install/Setup

#1 Post by mountainpitt » 02 Mar 2019, 21:28

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

Normal user
Posts: 4
Joined: 15 Aug 2017, 03:16

Re: PlatformIO Build/Compile Error New Install/Setup

#2 Post by oarchie » 10 Sep 2019, 01:11

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.

Core team member
Posts: 2379
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: PlatformIO Build/Compile Error New Install/Setup

#3 Post by TD-er » 10 Sep 2019, 10:12

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:

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests