Troubleshooting¶
Package Manager¶
[Error 5] Access is denied¶
PIO installs all packages to “core_dir/packages” directory. You MUST HAVE write access to this folder. Please note that PIO does not require “sudo”/administrative privileges.
Solution 1: Remove folder¶
A quick solution is to remove “core_dir/packages” folder and repeat installation/building/uploading again.
Solution 2: Antivirus¶
Some antivirus tools forbid programs to create files in the background. PIO Package Manager does all work in the background: downloads package, unpacks archive in temporary folder and moves final files to “core_dir/packages” folder.
Antivirus tool can block PIO, that is why you see “[Error 5] Access is denied”. Try to disable it for a while or add core_dir directory to exclusion/whitelist.
Solution 3: Run from Terminal¶
As we mentioned in “Solution 2”, antivirus tools can block background file system operations. Another solution is to run PIO Core (CLI) from a system terminal.
Open System Terminal, on Windows
cmd.exe
(not PIO IDE Terminal)Build a project and upload firmware using PIO Core (CLI) which will download and install all dependent packages:
# Change directory to PIO Project where is located "platformio.ini" cd path/to/platformio/project # Force PIO to install PIO Home dependencies pio home # Force PIO to install toolchains pio run --target upload
If “pio” command is not globally available in your environment and you use PIO IDE, please use built-in PIO Core (CLI) which is located in:
Windows:
C:\Users\{username}\.platformio\penv\Scripts\platformio
Please replace{username}
with a real user nameUnix:
~/.platformio/penv/bin/platformio
Note
You can add platformio
and pio
commands to your system environment.
See Install Shell Commands.
Building¶
UnicodeWarning: Unicode equal comparison failed¶
Full warning message is “UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal”.
KNOWN ISSUE. Please move your project to a folder which full path does not contain non-ASCII chars.
UnicodeDecodeError: Non-ASCII characters found in build environment¶
KNOWN ISSUE. PIO Core (CLI) currently does not support projects which contain non-ASCII characters (codes) in a full path or depend on the libraries which use non-ASCII characters in their names.
TEMPORARY SOLUTION
Use PIO IDE, it will automatically install PIO Core (CLI) in a root of system disk (
%DISK%/.platformio
) and avoid an issue when system User contains non-ASCII charactersDo not use non-ASCII characters in project folder name or its parent folders.
Also, if you want to place PIO Core (CLI) in own location, see:
Set
PLATFORMIO_CORE_DIR
environment variable with own pathConfigure custom location per project using core_dir option in “platformio.ini” (Project Configuration File).
Monitoring a serial port breaks upload¶
Answered in issue #384.