Troubleshooting

Package Manager

[Error 5] Access is denied

PlatformIO installs all packages to “core_dir/packages” directory. You MUST HAVE write access to this folder. Please note that PlatformIO 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. PlatformIO 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 PlatformIO, 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 PlatformIO Core (CLI) from a system terminal.

  1. Open System Terminal, on Windows cmd.exe (not PlatformIO IDE Terminal)

  2. Build a project and upload firmware using PlatformIO Core (CLI) which will download and install all dependent packages:

    # Change directory to PlatformIO Project where is located "platformio.ini"
    cd path/to/platformio/project
    
    # Force PlatformIO to install PlatformIO Home dependencies
    pio home
    
    # Force PlatformIO to install toolchains
    pio run --target upload
    

If “pio” command is not globally available in your environment and you use PlatformIO IDE, please use built-in PlatformIO Core (CLI) which is located in:

  • Windows: C:\Users\{username}\.platformio\penv\Scripts\platformio Please replace {username} with a real user name

  • Unix: ~/.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. PlatformIO 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

  1. Use PlatformIO IDE, it will automatically install PlatformIO Core (CLI) in a root of system disk (%DISK%/.platformio) and avoid an issue when system User contains non-ASCII characters

  2. Do not use non-ASCII characters in project folder name or its parent folders.

Also, if you want to place PlatformIO Core (CLI) in own location, see:

ARM toolchain: cc1plus: error while loading shared libraries

See related answers for error while loading shared libraries.

Archlinux: libncurses.so.5: cannot open shared object file

Answered in issue #291.

Monitoring a serial port breaks upload

Answered in issue #384.