PlatformIO Build/Compile Error New Install/Setup

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mountainpitt
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
https://www.letscontrolit.com/wiki/inde ... Platformio
Tutorial preparing to work with github
https://www.letscontrolit.com/wiki/inde ... ith_github
Tutorial building and uploading with platformio
https://www.letscontrolit.com/wiki/inde ... 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\main.py", line 169:
env.SConscript("$BUILD_SCRIPT")
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\users\gethub\.platformio\platforms\espressif8266@src-e5a066500c9cb11856f3e2e1d0334f85\builder\main.py", line 316:
target_elf = env.BuildProgram()
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 107:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
env.ConvertInoToCpp()
File "C:\Users\gethub\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\piomisc.py", line 189:
out_file = c.convert(ino_nodes)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\piomisc.py", line 52:
contents = self.merge(nodes)
File "C:\users\gethub\.platformio\penv\lib\site-packages\platformio\builder\tools\piomisc.py", line 74:
return "\n".join(["#include <Arduino.h>"] + lines) if lines else None

Processing normal_core_241_ESP8266_4096 (framework: arduino; platform: https://github.com/TD-er/platform-espre ... 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.

C:\Users\gethub>python
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

oarchie
Normal user
Posts: 3
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.
cheers

TD-er
Core team member
Posts: 1487
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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: https://github.com/letscontrolit/ESPEasy/issues/2594

Post Reply

Who is online

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