Platformio-vscode-ide: Could not start PIO Home server: Error: timeout。

Created on 13 Dec 2017  Â·  8Comments  Â·  Source: platformio/platformio-vscode-ide

When I upgraded to version 0.8.2, I was unable to open PIO HOME.
I removed %HOME_DIR%/.platformio/penv folder and restart IDE.
It's useless.
I have tried reinstalling, but it still prompts "Could not start PIO Home server: Error: timeout。"

help wanted

Most helpful comment

The problem is solved,thank you so much!

All 8 comments

Please open PIO IDE Terminal and type pio home, do you see any errors?

Traceback (most recent call last):
File "main.py", line 12, in init main
File "C:\Users\Y.platformio\penv\lib\site-packages\click__init__.py", line 18, in
from .core import Context, BaseCommand, Command, MultiCommand, Group, \
File "C:\Users\Y.platformio\penv\lib\site-packages\click\core.py", line 8, in
from .types import convert_type, IntRange, BOOL
File "C:\Users\Y.platformio\penv\lib\site-packages\click\types.py", line 5, in
from ._compat import open_stream, text_type, filename_to_ui, \
File "C:\Users\Y.platformio\penv\lib\site-packages\click_compat.py", line 6, in
from weakref import WeakKeyDictionary
File "C:\Users\Y.platformio\penv\lib\weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref

It seems that you have old version of Python in a system. Please navigate to OS Control Panel and remove ALL Python installation, then remove %HOME_DIR%/.platformio folder. Restart IDE.

The problem is solved,thank you so much!

Are there any other workarounds without removing other Python installations?

@withkittens
Please provide an output from system Terminal cmd

echo %PATH%
echo %PYTHONPATH%
python --version
pip --version
pip list

%PATH%:

C:\ProgramData\Oracle\Java\javapath;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Git\cmd;
C:\Program Files\dotnet\;
C:\Program Files\Go\bin;
C:\Program Files\LLVM\bin;
C:\Program Files\CMake\bin;
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin;
C:\Program Files\GNU MCU Eclipse Windows Build Tools\bin;
C:\Users\withkittens\.cargo\bin;

%PYTHONPATH% is undefined. Thus, python and pip are not found (I've ran commands under Integrated Terminal of VS Code).

I do have an installed Python (3.6.2 under C:\dev\Python36) but it isn't in PATH.


This is an error in my case:

[platformio.platformio-ide] Could not start PIO Home server: Traceback (most recent call last):
  File "main.py", line 12, in init main
  File "c:\users\withkittens\.platformio\penv\lib\site-packages\click\__init__.py", line 18, in <module>
    from .core import Context, BaseCommand, Command, MultiCommand, Group, \
  File "c:\users\withkittens\.platformio\penv\lib\site-packages\click\core.py", line 8, in <module>
    from .types import convert_type, IntRange, BOOL
  File "c:\users\withkittens\.platformio\penv\lib\site-packages\click\types.py", line 5, in <module>
    from ._compat import open_stream, text_type, filename_to_ui, \
  File "c:\users\withkittens\.platformio\penv\lib\site-packages\click\_compat.py", line 6, in <module>
    from weakref import WeakKeyDictionary
  File "C:\Users\withkittens\.platformio\python27\Lib\weakref.py", line 14, in <module>
    from _weakref import (
ImportError: cannot import name _remove_dead_weakref

I will be happy to provide any other info that would be useful.

@withkittens I've just removed all Pythons from VM, install Python 3.6.4, then started PIO IDE and all works good.

Could you remove ALL Pythons, install Python 3.6 again and restart PIO IDE? Also, don't forget to remove "C:\Users\withkittens.platformio"

Was this page helpful?
0 / 5 - 0 ratings