Skip to content

Commit esp8266/Arduino@9790e1c python issue #5792

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

Closed
5 of 6 tasks
reaper7 opened this issue Feb 20, 2019 · 6 comments · Fixed by #5796
Closed
5 of 6 tasks

Commit esp8266/Arduino@9790e1c python issue #5792

reaper7 opened this issue Feb 20, 2019 · 6 comments · Fixed by #5796
Assignees

Comments

@reaper7
Copy link
Contributor

reaper7 commented Feb 20, 2019

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [ESP-12]
  • Core Version: [latest git]
  • Development Env: [Arduino IDE]
  • Operating System: [Windows 10]

Settings in IDE

  • Module: [Nodemcu]
  • Flash Mode: [default]
  • Flash Size: [4MB/0MB]
  • lwip Variant: [v2 Lower Memory]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [OTA]
  • Upload Speed: [115200] (serial upload only)

Problem Description

1
After commit 9790e1c , archive python-3.7.2.post1-embed-win32.zip is unpacked into wrong directory.
Should be unpacked to esp8266/tools/python/
but is unpacked to parent dir esp8266/tools/

Compilation break with error -> debug messages below "1. Python is missing"

2
After manually moved all python related files to esp8266/tools/python/ ,
sketch compiles without problems but attempt to load fails with an error -> debug massages below "2. Upload problem"

When I try manual check new included python:

reaper7@AT-HOME MINGW64 /c/Programy/arduino/hardware/esp8266com/esp8266/tools/python (master)
$ /c/Programy/arduino/hardware/esp8266com/esp8266/tools/python/python.exe
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
>>> import os
>>> pid = os.fork()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'fork'
>>>

related:
9790e1c#commitcomment-32366937
#5789 FIXED with #5791

MCVE Sketch

examples->digital->BlinkWithoutDelay.ino

Debug Messages

  1. Python is missing:
C:\Programy\arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Programy\arduino\hardware -hardware C:\Users\reaper7\AppData\Local\Arduino15\packages -tools C:\Programy\arduino\tools-builder -tools C:\Programy\arduino\hardware\tools\avr -tools C:\Users\reaper7\AppData\Local\Arduino15\packages -built-in-libraries C:\Programy\arduino\libraries -libraries C:\Programy\arduino_projekty\libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path C:\TEMP\arduino_build_697025 -warnings=none -build-cache C:\TEMP\arduino_cache_809626 -prefs=build.warn_data_percentage=75 -verbose C:\Programy\arduino\examples\02.Digital\BlinkWithoutDelay\BlinkWithoutDelay.ino
C:\Programy\arduino\arduino-builder -compile -logger=machine -hardware C:\Programy\arduino\hardware -hardware C:\Users\reaper7\AppData\Local\Arduino15\packages -tools C:\Programy\arduino\tools-builder -tools C:\Programy\arduino\hardware\tools\avr -tools C:\Users\reaper7\AppData\Local\Arduino15\packages -built-in-libraries C:\Programy\arduino\libraries -libraries C:\Programy\arduino_projekty\libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path C:\TEMP\arduino_build_697025 -warnings=none -build-cache C:\TEMP\arduino_cache_809626 -prefs=build.warn_data_percentage=75 -verbose C:\Programy\arduino\examples\02.Digital\BlinkWithoutDelay\BlinkWithoutDelay.ino
Using board 'nodemcuv2' from platform in folder: C:\Programy\arduino\hardware\esp8266com\esp8266
Using core 'esp8266' from platform in folder: C:\Programy\arduino\hardware\esp8266com\esp8266
Detecting libraries used...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o nul
Generating function prototypes...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o "C:\\TEMP\\arduino_build_697025\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Programy\\arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\TEMP\\arduino_build_697025\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Kompilowanie szkicu...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/signing.py" --mode header --publickey "C:\\Programy\\arduino\\examples\\02.Digital\\BlinkWithoutDelay/public.key" --out "C:\\TEMP\\arduino_build_697025/core/Updater_Signing.h"
exec: "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe": file does not exist
Blad kompilacji dla plytki NodeMCU 1.0 (ESP-12E Module).
  1. Upload problem:
C:\Programy\arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Programy\arduino\hardware -hardware C:\Users\reaper7\AppData\Local\Arduino15\packages -tools C:\Programy\arduino\tools-builder -tools C:\Programy\arduino\hardware\tools\avr -tools C:\Users\reaper7\AppData\Local\Arduino15\packages -built-in-libraries C:\Programy\arduino\libraries -libraries C:\Programy\arduino_projekty\libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path C:\TEMP\arduino_build_697025 -warnings=none -build-cache C:\TEMP\arduino_cache_809626 -prefs=build.warn_data_percentage=75 -verbose C:\Programy\arduino\examples\02.Digital\BlinkWithoutDelay\BlinkWithoutDelay.ino
C:\Programy\arduino\arduino-builder -compile -logger=machine -hardware C:\Programy\arduino\hardware -hardware C:\Users\reaper7\AppData\Local\Arduino15\packages -tools C:\Programy\arduino\tools-builder -tools C:\Programy\arduino\hardware\tools\avr -tools C:\Users\reaper7\AppData\Local\Arduino15\packages -built-in-libraries C:\Programy\arduino\libraries -libraries C:\Programy\arduino_projekty\libraries -fqbn=esp8266com:esp8266:nodemcuv2:xtal=80,vt=flash,exception=disabled,eesz=4M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10808 -build-path C:\TEMP\arduino_build_697025 -warnings=none -build-cache C:\TEMP\arduino_cache_809626 -prefs=build.warn_data_percentage=75 -verbose C:\Programy\arduino\examples\02.Digital\BlinkWithoutDelay\BlinkWithoutDelay.ino
Using board 'nodemcuv2' from platform in folder: C:\Programy\arduino\hardware\esp8266com\esp8266
Using core 'esp8266' from platform in folder: C:\Programy\arduino\hardware\esp8266com\esp8266
Detecting libraries used...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o nul
Generating function prototypes...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -fno-exceptions -w -x c++ -E -CC -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o "C:\\TEMP\\arduino_build_697025\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Programy\\arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\TEMP\\arduino_build_697025\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Kompilowanie szkicu...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lwip2/include" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\\TEMP\\arduino_build_697025/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK221=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10808 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 "-DARDUINO_BOARD=\"ESP8266_NODEMCU\"" -DFLASHMODE_DIO -DESP8266 "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\cores\\esp8266" "-IC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266\\variants\\nodemcu" "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp" -o "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/signing.py" --mode header --publickey "C:\\Programy\\arduino\\examples\\02.Digital\\BlinkWithoutDelay/public.key" --out "C:\\TEMP\\arduino_build_697025/core/Updater_Signing.h"
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/makecorever.py" --build_path "C:\\TEMP\\arduino_build_697025" --platform_path "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266" --version unix-2.6.0-dev
Using precompiled core: C:\TEMP\arduino_cache_809626\core\core_d73c36e7edb94d6f1868c4723563ae9d.a
Linking everything together...
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc" -CC -E -P -DVTABLES_IN_FLASH "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "C:\\TEMP\\arduino_build_697025/local.eagle.app.v6.common.ld"
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc" -fno-exceptions -Wl,-Map "-Wl,C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.map" -g -w -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static "-LC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lib" "-LC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lib/NONOSDK221" "-LC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/ld" "-LC:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/lib" -Teagle.flash.4m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.elf" -Wl,--start-group "C:\\TEMP\\arduino_build_697025\\sketch\\BlinkWithoutDelay.ino.cpp.o" "C:\\TEMP\\arduino_cache_809626\\core\\core_d73c36e7edb94d6f1868c4723563ae9d.a" -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group "-LC:\\TEMP\\arduino_build_697025"
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/elf2bin.py" --eboot "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/bootloaders/eboot/eboot.elf" --app "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.elf" --flash_mode dio --flash_freq 40 --flash_size 4M --path "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin" --out "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.bin"
Creating BIN file "C:\TEMP\arduino_build_697025/BlinkWithoutDelay.ino.bin" using "C:\TEMP\arduino_build_697025/BlinkWithoutDelay.ino.elf"

"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/signing.py" --mode sign --privatekey "C:\\Programy\\arduino\\examples\\02.Digital\\BlinkWithoutDelay/private.key" --bin "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.bin" --out "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.bin.signed"
"C:\\Programy\\arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-size" -A "C:\\TEMP\\arduino_build_697025/BlinkWithoutDelay.ino.elf"
Szkic uzywa 257112 bajtów (24%) pamieci programu. Maksimum to 1044464 bajtów.
Zmienne globalne uzywaja 26548 bajtów (32%) pamieci dynamicznej, pozostawiajac 55372 bajtów dla zmiennych lokalnych. Maksimum to 81920 bajtów.
Traceback (most recent call last):
  File "C:\Programy\arduino\hardware\esp8266com\esp8266/tools/upload.py", line 24, in <module>
    pid  = os.fork()
AttributeError: module 'os' has no attribute 'fork'
AttributeError: module 'os' has no attribute 'fork'
@reaper7
Copy link
Contributor Author

reaper7 commented Feb 20, 2019

The archive is still incorrectly unpacked
Look at dirs struct after python get.py command:
arduino_python

and what get.py rename file (instead dir):
arduino_get

so... I changed dir name from python-3.7.2.post1 to python
and restored _asyncio.pyd file to python dir.

Compilation OK but second problem still exist!

Traceback (most recent call last):
  File "C:\PROGRAMY\Arduino\hardware\esp8266com\esp8266/tools/upload.py", line 24, in <module>
    pid  = os.fork()
AttributeError: module 'os' has no attribute 'fork'
AttributeError: module 'os' has no attribute 'fork'

os.fork works on windows10 ???

btw, why this issue is closed without any user feedback?

@earlephilhower
Copy link
Collaborator

@reaper7, merges automatically close issues here on GH. It's not like Bugzilla or some other tools I've used that require the original submitter to check and sign off.

Anyway, as others have pointed out, I re-uploaded the original packaged ZIP and not the one w/the proper subdir structure for Arduino in my rush out the door this AM. D'oh.

I have fixed that and verified with my own eyeballs just now with #5797 that python does really expand into tools/python/.

Could you please delete your whole tools dir, "git update" to reset everything to fresh checkout state, apply the PR, and give it a go? If not, let's get comments tracked in that PR so we can clean it up.

The original esptool.py may have gotten bitten by bit (or brain) rot in the month or so since I stopped looking at it, and all active maintainers are Linux/Mac first (I need to spin up a Win VM w/USB passthru for testing), so Windows' quirks are something of a pain...

Thx
-EFP3

@reaper7
Copy link
Contributor Author

reaper7 commented Feb 20, 2019

so... #5797 solves problem with python dirs.
as @d-a-v wrote, compilation and signing OK
but still can't upload:

...
Linking everything together...
"C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc" -CC -E -P -DVTABLES_IN_FLASH "C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "C:\\tmp\\arduino_build_225980/local.eagle.app.v6.common.ld"
"C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc" -fno-exceptions -Wl,-Map "-Wl,C:\\tmp\\arduino_build_225980/Blink.ino.map" -g -Wall -Wextra -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static "-LC:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lib" "-LC:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/lib/NONOSDK221" "-LC:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/ld" "-LC:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/sdk/libc/xtensa-lx106-elf/lib" -Teagle.flash.4m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o "C:\\tmp\\arduino_build_225980/Blink.ino.elf" -Wl,--start-group "C:\\tmp\\arduino_build_225980\\sketch\\Blink.ino.cpp.o" "C:\\tmp\\arduino_build_225980\\core\\core.a" -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc -Wl,--end-group "-LC:\\tmp\\arduino_build_225980"
"C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/elf2bin.py" --eboot "C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/bootloaders/eboot/eboot.elf" --app "C:\\tmp\\arduino_build_225980/Blink.ino.elf" --flash_mode dio --flash_freq 40 --flash_size 4M --path "C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin" --out "C:\\tmp\\arduino_build_225980/Blink.ino.bin"
Creating BIN file "C:\tmp\arduino_build_225980/Blink.ino.bin" using "C:\tmp\arduino_build_225980/Blink.ino.elf"

"C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/python/python.exe" "C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/signing.py" --mode sign --privatekey "C:\\PROGRAMY\\Arduino\\examples\\01.Basics\\Blink/private.key" --bin "C:\\tmp\\arduino_build_225980/Blink.ino.bin" --out "C:\\tmp\\arduino_build_225980/Blink.ino.bin.signed"
"C:\\PROGRAMY\\Arduino\\hardware\\esp8266com\\esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-size" -A "C:\\tmp\\arduino_build_225980/Blink.ino.elf"
Szkic używa 257256 bajtów (24%) pamięci programu. Maksimum to 1044464 bajtów.
Zmienne globalne używają 26556 bajtów (32%) pamięci dynamicznej, pozostawiając 55364 bajtów dla zmiennych lokalnych. Maksimum to 81920 bajtów.
Traceback (most recent call last):
  File "C:\PROGRAMY\Arduino\hardware\esp8266com\esp8266/tools/upload.py", line 24, in <module>
    pid  = os.fork()
AttributeError: module 'os' has no attribute 'fork'
AttributeError: module 'os' has no attribute 'fork'

@earlephilhower
Copy link
Collaborator

https://docs.python.org/3/library/os.html#os.fork

Windows is a right pain.

Python subprocess or multiprocessing should be able to make this work, but I'll need to think about it since I need to push in the pyserial path addition to the code stream.

@reaper7
Copy link
Contributor Author

reaper7 commented Feb 20, 2019

@earlephilhower - what is your suggestion, I should temporarily switch to a "stable" 2.5.0b3 version from board manager or wait for a solution for current git version?

@earlephilhower
Copy link
Collaborator

PRs always welcome. :) It's gonna be several hours before I myself will have time to try and fake os.fork() in the uploader script. 2.5.0-rel doesn't have the esptool.py PR, so you can use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants