-
-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: package install sometimes fails on shutil.move of temporary directory #3328
Comments
Unfortunately, I also cannot reproduce the issue, tried espurna project with Python 3.7,3.8 on Win 8, Win 10. |
I can't add any more info, since I can't reproduce with 3 different Windows machines as well. platformio-core/platformio/proc.py Line 112 in 6013903
|
@valeros, @ivankravets I had a quite comprehensive discussion and some "debugging" with mcspr, who supported me well. You can follow the discussion, what we've tried and what I did and the output and errors of PIO. I uninstalled VS Code, PIO, PYTHON, deleted directories and reinstalled everything required, but with always the same errors. |
Hi, |
@oscarsan1 so did I, and I uninstalled/reinstalled it multiple times. I'm using the latest PYTHON 3.8 (only 32Bit available) and installed for all users. But it's good to know that it "could" work in principle - just not for me :-( now |
@ALL I spent a lot of effort in further testing and installed VS Code + Platformio now on two different PC's with Windows 10 Pro 1909 and I did 3 different installation on 3 different disks with different users following the platformio instructions. |
Do you have antivirus tools? They can block PlatformIO. |
I have deactivated the AV tools and also excluded the directories. I try now to deinstall all AV's on one PC (only Microsoft Defender - default on Windows 10). I can also try then to disable Microsoft Defender (having no protection) for just one build. But it's not acceptable to have no virus protection at all on a PC. I can confirm now, that with all antivirus installed and only Windows defnder running, there error is exact the same. Then I even switched off alos the last protection, the Windows Defender and have NO antivirus protection, I get the same error. The problematic script code is shutil.py line 607. |
@ivankravets I did not give up and did further testing. Now I tried your previous recommendation and changed to espurna/code directory and executed: |
Root cause: platformio/platformio-vscode-ide#1995 |
Configuration
Operating system:
Windows 10 1909
PlatformIO Version (
platformio --version
):PlatformIO, version 4.1.0 (?) / need confirmation
Description of problem
Original issue (latest comment with traceback): xoseperez/espurna#2006 (comment)
If platformio.ini has
lib_deps = ...
with git urls, package installation will fail onshutil.move
after it copies temporary directory into a package dir and tries to remove that temporary directory.Steps to Reproduce
lib_deps = ...
. ESPurna repo is a general example that has a couple of those.pio lib install
(see the referenced issue)pio run
call, because data was already copied before the previous directory caused an error and was not removed.I cannot reproduce, so cc @davebuk @oscarsan1 @knopserl
Actual Results
See above.
Expected Results
shutil.move fails to rename directories for some reason, I would expect that step to succeed:
https://github.com/python/cpython/blob/fa919fdf2583bdfead1df00e842f24f30b2a34bf/Lib/shutil.py#L780
The specific issue is the
rmtree
inability to remove git object files. This was previously fixed for some parts of the platformio code by adding a customfs.rmtree
function thatchmod
's them via onerror hook, but the original Python function is used by the move (and it cannot be overriden)If problems with PlatformIO Build System:
See ESPurna's
https://github.com/xoseperez/espurna/blob/dev/code/platformio.ini
Additional info
-
The text was updated successfully, but these errors were encountered: