PlatformIO Community

ValueError : unsupported pickle protocol: 5

Not really sure what happened before I started having problems this morning, but I was not able to compile, build and load code as I have been doing for months now. I was getting an error concerning PlatformIO not finding python.exe. I thought this was strange as I have not seen this error before.

Eventually I tried installing the latest version of python. I was then able to build but not load as there was now some compatibility error. So I uninstalled all versions of python and reinstalled python37 again.

But now I get the error:
[src\main.cpp] ValueError : unsupported pickle protocol: 5

before the build completes. I think this pickle protocol is related to python but I’m not absolutely sure. Any ideas?

Thanks!

Seems like you’re having having trouble with the SCons build system, as related here https://github.com/SCons/scons/issues/3402

I’d try to uninstall PIO again and install and run it using Python2?

Is there a version of python that you recommend? I’m now having issues with the pio re-installation. I’m trying to follow the guides on the manual creation. I don’t remember needing to do this with the original installation.

Error: Could not create PIO Core Virtual Environment. Please create it manually -> http://bit.ly/pio-core-virtualenv Error: Virtualenv Create: Traceback (most recent call last): File “C:\Users\name.platformio.cache\tmp-7472E4bwFRgOvkvI\virtualenv-16.7.5\virtualenv.py”, line 2632, in main() File “C:\Users\name.platformio.cache\tmp-7472E4bwFRgOvkvI\virtualenv-16.7.5\virtualenv.py”, line 870, in main symlink=options.symlink, File “C:\Users\name.platformio.cache\tmp-7472E4bwFRgOvkvI\virtualenv-16.7.5\virtualenv.py”, line 1156, in create_environment install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink) File “C:\Users\name.platformio.cache\tmp-7472E4bwFRgOvkvI\virtualenv-16.7.5\virtualenv.py”, line 1526, in install_python shutil.copyfile(executable, py_executable) File “C:\Users\name.platformio\python37\lib\shutil.py”, line 121, in copyfile with open(dst, ‘wb’) as fd…

Remove your entire C:\Users\name\.platformio folder and retry installation.

2 Likes

Thank you for your help. It’s running now. :slight_smile:

Thanks for the report! We added workaround to this SCon’s issue on our side:

So, we will use custom SCons Sign DB depending on the Python interpreter.

1 Like

Please remove .pio folder from a project and start build process again.

Where is the .pio floder located

It’s a hidden folder that is created in the PlatformIO project.

:~/pio_tests/avr$ ls -la
total 40
drwxr-xr-x  7 max max 4096 Mai 29 19:21 .
drwxr-xr-x 10 max max 4096 Sep 22 16:47 ..
-rw-r--r--  1 max max    5 Mai 29 19:20 .gitignore
drwxr-xr-x  2 max max 4096 Mai 29 19:20 include
drwxr-xr-x  2 max max 4096 Mai 29 19:20 lib
drwxr-xr-x  4 max max 4096 Mai 29 19:21 .pio
-rw-r--r--  1 max max  511 Mai 29 19:20 platformio.ini
drwxr-xr-x  2 max max 4096 Mai 29 19:20 src
drwxr-xr-x  2 max max 4096 Mai 29 19:20 test
-rw-r--r--  1 max max 1557 Mai 29 19:20 .travis.yml