I am trying to install espressif32 platform on PlatformIO on Visual Studio Code on Win10.
However, I got the follow error messages,
PackageManager: Installing tool-openocd-esp32 @ ~1.1000.20180920
Downloading [####################################] 100%
Unpacking [#########################-----------] 71%
Unpacking…
Warning! Package Mirror: [Errno 22] invalid mode (‘wb’) or filename: ‘C:\Users\mstsai\.platformio\packages\_tmp_installing-gfoqhr-package\share\openocd\scripts\target\1986\xd0\xb2\xd0\xb51\xd1\x82.cfg’
Looking for another mirror…
Error: Could not install ‘tool-openocd-esp32’ with version requirements ‘~1.1000.20180920’ for your system ‘windows_amd64’.
Please try this solution → Redirecting...
The terminal process terminated with exit code: 1
I downloaded the file, tool-openocd-esp32-darwin_x86_64-1.1000.20180920.tar.gz, and checked it. I found that the filename of a file in share/openoce/scripts/target/ has rather strange characters, i.e., 1986ве1т.cfg.
I think this is the reason that causes the failure of the installation.
How do I resolve this problem?
Strictly speaking this is the Mac OS version but also it appears on every platform. Seems like the unpacking logic in the core cannot handle special UTF8 or Unicode characters. @ivankravets?
I tried manual installation the package. I created a folder named, tool-openocd-esp32, in .platformio\packagesand and extracted the file into that folder.
Executed ‘pio run’ on terminal. I still got the same error messages!!
Hello, l got the same issue.
I’ve updated all but it doesn’t solve the issue.
I got same error messages of invalid mode or file name.
I’m using windows 10 professional 64bit edition and vscode.
PIO Plus (https://pioplus.com) v2.5.2
PackageManager: Installing tool-openocd-esp32 @ ~1.1000.20181026
Downloading [####################################] 100%
Unpacking [#########################-----------] 71% 00:00:08
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\KIKI\\.platformio\\packages\\_tmp_installing-gzjlhl-package\\share\\openocd\\scripts\\target\\1986\xd0\xb2\xd0\xb51\xd1\x82.cfg'
Looking for another mirror...
Downloading [####################################] 100%
Unpacking [#########################-----------] 71% 00:00:06
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\KIKI\\.platformio\\packages\\_tmp_installing-tyx1jq-package\\share\\openocd\\scripts\\target\\1986\xd0\xb2\xd0\xb51\xd1\x82.cfg'
Looking for another mirror...
Error: Could not install 'tool-openocd-esp32' with version requirements '~1.1000.20181026' for your system 'windows_amd64'.
Please try this solution -> http://bit.ly/faq-package-manager
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
@ivankravets@valeros You need to test this on a PC without kyrillic language packs installed, the problem here is unpacking the file called 1986ве1т.cfg (ref)
I still have an issue.
к1879xб1я.cfg, This file causes error.
Processing esp32doit-devkit-v1 (framework: arduino; platform: espressif32; board: esp32doit-devkit-v1)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PackageManager: Installing tool-openocd-esp32 @ ~1.1000.20190624
Downloading [####################################] 100%
Unpacking [################################----] 90% 00:00:02
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\KIKI\\.platformio\\packages\\_tmp_installing-8ipa7j-package\\share\\openocd\\scripts\\target\\\xd0\xba1879x\xd0\xb11\xd1\x8f.cfg'
Looking for another mirror...
Downloading [####################################] 100%
Unpacking [################################----] 90% 00:00:02
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\KIKI\\.platformio\\packages\\_tmp_installing-bf_csv-package\\share\\openocd\\scripts\\target\\\xd0\xba1879x\xd0\xb11\xd1\x8f.cfg'
Looking for another mirror...
Error: Could not install 'tool-openocd-esp32' with version requirements '~1.1000.20190624' for your system 'windows_amd64'.
Please try this solution -> http://bit.ly/faq-package-manager
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
I just experienced this issue with the latest release tool-openocd-windows_amd64-2.1000.200628 for stm32.
I had no problem using the previous release (2.1000.190707), which is one release newer than what @Dr.Q reported having problems with.
My system is a german Windows 10 Pro by Lenovo. I’m not aware of ever having done anything with kyrillic language packs. When removing tool-openocd from my packages folder (or deleting the packages folder altogether) and rerunning my “upload” command in PlatformIO, I get the following error message:
Processing bluepill (platform: ststm32@~6.1.1; board: bluepill_f103c8; framework: libopencm3)
--------------------------------------------------------------------------------------------------------------------------------------------------
PackageManager: Installing tool-openocd @ ~2.1000.0
Downloading [####################################] 100%
Unpacking [#######################-------------] 64%
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\Damian\\.platformio\\packages\\_tmp_installing-bun2ao-package\\scripts\\target\\1986??1?.cfg'
Looking for another mirror...
Downloading [####################################] 100%
Unpacking [#######################-------------] 64%
Unpacking...
Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\Damian\\.platformio\\packages\\_tmp_installing-kgt7ew-package\\scripts\\target\\1986??1?.cfg'
Looking for another mirror...
Error: Could not install 'tool-openocd' with version requirements '~2.1000.0' for your system 'windows_amd64'.
Please try this solution -> http://bit.ly/faq-package-manager
This can reliably be reproduced so long as the package tool-openocd is not available to PlatformIO.
Extracting the tarball tool-openocd-windows_amd64-2.1000.200628.tar.gz manually using 7-Zip 19.00 (2019-02-21) also gives a strange warning message: 7zip wants to overwrite the file tool-openocd-windows_amd64-2.1000.200628\@PaxHeader with .\.\\n@PaxHeader. Note the weird newline in the second path! It actually shows up as a line break in the UI, not as the escape sequence I have here. Curiously, 7zip File Manager does not show the existence of a file named @PaxHeader in the tarball. However, after extracting finishes, the file is present.
If I rename the extracted folder to tool-openocd and move it to my packages folder, PlatformIO will happily upload to my bluepill board. However, teaching all users to apply this workaround which itself leads to another confusing error message does not really scale. Is it possible to make auto-installation of tool-openocd work again on windows?
@Dr.Q/@deltaphi 's solution did not work for me. I have downloaded tool-openocd-windows_x86-2.1000.200628.tar and extracted it to C:\Users\username\.platformio\packages (noticing the same 7zip warning that @deltaphi has seen) and renamed the folder. The directory structure looks good to me, but the PackageManager still attempts to install tool-openocd and fails.
I haven’t tried the version tool-openocd-windows_amd64-2.1000.200628.tar.gz. I just tried the tool-openocd-windows_amd64-2.1000.190707.tar.gz version as @deltaphi mentioned. I extracted the files on %userprofile%\.platformio\packages\tool-openocd folder.
I tried it on two different PCs and it worked on both.
Just to confirm that I had the issue with the VScode IDE running on windows 8.1 enterprise.
Manual download of tool-openocd-windows_amd64-2.1000.200628.tar.gz and extract into the tool-openocd folder as above worked for me.
Original error when VS code attempted download was Warning! Package Mirror: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\jryan\\.platformio\\packages\\_tmp_installing-8dezjz-package\\scripts\\target\\1986??1?.cfg'
Folder \tool-openocd-windows_amd64-2.1000.200628.tar\scripts\target\ contains two files with ? in their name 1986??1?.cfg and ?1879x?1?.cfg