esphome 2021.10.3: this Python implementation (python3.9) is not supported by the script. #247

Open
opened 2 months ago by Xuefer · 6 comments
Xuefer commented 2 months ago
qcheck -v esphome
Checking acct-group/esphome-0 ...
  * 4 out of 4 files are good
Checking acct-user/esphome-0 ...
  * 7 out of 7 files are good
Checking dev-embedded/esphome-2021.10.3 ...
  * 4493 out of 4493 files are good

reproduced with --device /dev/ttyUSB0 only, but not with --device address.local

# esphome run entrance.yaml --device /dev/ttyUSB0
INFO Reading configuration entrance.yaml...
INFO Generating C++ source...
INFO Compiling app...
*******************************************************************************************************************************************************************************************************************
Obsolete PIO Core v5.2.1 is used (previous was 5.2.2)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/page/faq.html#multiple-platformio-cores-in-a-system
*******************************************************************************************************************************************************************************************************************
Processing entrance (board: nodemcu-32s; framework: arduino; platform: espressif32 @ 3.3.2)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 1.0
|-- <FS> 1.0
|-- <Update> 1.0
|-- <ESPAsyncWebServer-esphome> 2.0.0
|   |-- <AsyncTCP-esphome> 1.2.2
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESPmDNS> 1.0
Compiling .pioenvs/entrance/src/main.cpp.o
Linking .pioenvs/entrance/firmware.elf
RAM:   [=         ]  12.7% (used 41532 bytes from 327680 bytes)
Flash: [=====     ]  49.2% (used 903162 bytes from 1835008 bytes)
Building .pioenvs/entrance/firmware.bin
========================================================================================== [SUCCESS] Took 17.30 seconds ==========================================================================================
INFO Successfully compiled program.

/usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script.
``` qcheck -v esphome Checking acct-group/esphome-0 ... * 4 out of 4 files are good Checking acct-user/esphome-0 ... * 7 out of 7 files are good Checking dev-embedded/esphome-2021.10.3 ... * 4493 out of 4493 files are good ``` reproduced with ```--device /dev/ttyUSB0``` only, but not with ```--device address.local``` ``` # esphome run entrance.yaml --device /dev/ttyUSB0 INFO Reading configuration entrance.yaml... INFO Generating C++ source... INFO Compiling app... ******************************************************************************************************************************************************************************************************************* Obsolete PIO Core v5.2.1 is used (previous was 5.2.2) Please remove multiple PIO Cores from a system: https://docs.platformio.org/page/faq.html#multiple-platformio-cores-in-a-system ******************************************************************************************************************************************************************************************************************* Processing entrance (board: nodemcu-32s; framework: arduino; platform: espressif32 @ 3.3.2) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash Dependency Graph |-- <AsyncTCP-esphome> 1.2.2 |-- <WiFi> 1.0 |-- <FS> 1.0 |-- <Update> 1.0 |-- <ESPAsyncWebServer-esphome> 2.0.0 | |-- <AsyncTCP-esphome> 1.2.2 |-- <ArduinoJson-esphomelib> 5.13.3 |-- <ESPmDNS> 1.0 Compiling .pioenvs/entrance/src/main.cpp.o Linking .pioenvs/entrance/firmware.elf RAM: [= ] 12.7% (used 41532 bytes from 327680 bytes) Flash: [===== ] 49.2% (used 903162 bytes from 1835008 bytes) Building .pioenvs/entrance/firmware.bin ========================================================================================== [SUCCESS] Took 17.30 seconds ========================================================================================== INFO Successfully compiled program. /usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script. ```
Xuefer changed title from esphome: this Python implementation (python3.9) is not supported by the script. to esphome 2021.10.3: this Python implementation (python3.9) is not supported by the script. 2 months ago
onkelbeh added the
bug
label 2 months ago
onkelbeh self-assigned this 2 months ago
Owner

Could you please try with esphome-2021.11.1, I cannot reproduce this error.

Could you please try with esphome-2021.11.1, I cannot reproduce this error.
Poster
$ sudo qcheck -v esphome
Checking acct-group/esphome-0 ...
  * 4 out of 4 files are good
Checking acct-user/esphome-0 ...
  * 7 out of 7 files are good
Checking dev-embedded/esphome-2021.11.1 ...
  * 4566 out of 4566 files are good
xuefer@compiler ~/src/iot
$ esphome run entrance.yaml  --device /dev/ttyUSB0
INFO Reading configuration entrance.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing entrance (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 3.3.2)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 1.0
|-- <FS> 1.0
|-- <Update> 1.0
|-- <ESPAsyncWebServer-esphome> 2.1.0
|   |-- <AsyncTCP-esphome> 1.2.2
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <ESPmDNS> 1.0
RAM:   [=         ]  12.7% (used 41532 bytes from 327680 bytes)
Flash: [=====     ]  49.2% (used 902878 bytes from 1835008 bytes)
=========================================================================================== [SUCCESS] Took 2.86 seconds ===========================================================================================
INFO Successfully compiled program.
/usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script.
``` $ sudo qcheck -v esphome Checking acct-group/esphome-0 ... * 4 out of 4 files are good Checking acct-user/esphome-0 ... * 7 out of 7 files are good Checking dev-embedded/esphome-2021.11.1 ... * 4566 out of 4566 files are good xuefer@compiler ~/src/iot ``` ``` $ esphome run entrance.yaml --device /dev/ttyUSB0 INFO Reading configuration entrance.yaml... INFO Generating C++ source... INFO Compiling app... Processing entrance (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 3.3.2) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash Dependency Graph |-- <AsyncTCP-esphome> 1.2.2 |-- <WiFi> 1.0 |-- <FS> 1.0 |-- <Update> 1.0 |-- <ESPAsyncWebServer-esphome> 2.1.0 | |-- <AsyncTCP-esphome> 1.2.2 |-- <ArduinoJson-esphomelib> 5.13.3 |-- <ESPmDNS> 1.0 RAM: [= ] 12.7% (used 41532 bytes from 327680 bytes) Flash: [===== ] 49.2% (used 902878 bytes from 1835008 bytes) =========================================================================================== [SUCCESS] Took 2.86 seconds =========================================================================================== INFO Successfully compiled program. /usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script. ```
Poster
close(3)                    = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev", {st_mode=S_IFDIR|0755, st_size=4060, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0
readlink("/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", "../../ttyUSB0", 4096) = 13
newfstatat(AT_FDCWD, "/dev/ttyUSB0", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xbc, 0), ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev", {st_mode=S_IFDIR|0755, st_size=4060, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0
readlink("/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", "../../ttyUSB0", 4096) = 13
newfstatat(AT_FDCWD, "/dev/ttyUSB0", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xbc, 0), ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/sys/class/tty/usb-1a86_USB2.0-Ser_-if00-port0/device", 0x7fffffffc170, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0
openat(AT_FDCWD, "/usr/bin/__pycache__/esptool.cpython-39.pyc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/bin/esptool.py", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2899, ...}, AT_EMPTY_PATH) = 0
ioctl(3, TCGETS, 0x7fffffffb440) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)       = 0
lseek(3, 0, SEEK_CUR)       = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2899, ...}, AT_EMPTY_PATH) = 0
read(3, "#!/usr/bin/python-exec2c\n# vim:f"..., 2900) = 2899
read(3, "", 1)              = 0
close(3)                    = 0
newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/bin/__pycache__", 0x7fffffffad40, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0
mkdir("/usr/bin/__pycache__", 0777) = -1 EACCES (Permission denied)
newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib/python3.9", {st_mode=S_IFDIR|0755, st_size=4124, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib/python3.9/lib-dynload", {st_mode=S_IFDIR|0755, st_size=5814, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages", {st_mode=S_IFDIR|0755, st_size=12016, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages/epython.py", {st_mode=S_IFREG|0644, st_size=20, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages/epython.py", {st_mode=S_IFREG|0644, st_size=20, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/python3.9/site-packages/__pycache__/epython.cpython-39.pyc", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=156, ...}, AT_EMPTY_PATH) = 0
ioctl(3, TCGETS, 0x7fffffffa450) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)       = 0
lseek(3, 0, SEEK_CUR)       = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=156, ...}, AT_EMPTY_PATH) = 0
read(3, "a\r\r\n\0\0\0\0m\242\207a\24\0\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 157) = 156
read(3, "", 1)              = 0
close(3)                    = 0
readlink("/usr/bin/esphome", 0x7fffffffa650, 4096) = -1 EINVAL (Invalid argument)
openat(AT_FDCWD, "/usr/lib/python-exec/python3.9/esphome", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(2, "/usr/lib/python-exec/python3.9/e"..., 111/usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script.
) = 111

``` close(3) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev", {st_mode=S_IFDIR|0755, st_size=4060, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0 readlink("/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", "../../ttyUSB0", 4096) = 13 newfstatat(AT_FDCWD, "/dev/ttyUSB0", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xbc, 0), ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev", {st_mode=S_IFDIR|0755, st_size=4060, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", {st_mode=S_IFLNK|0777, st_size=13, ...}, AT_SYMLINK_NOFOLLOW) = 0 readlink("/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0", "../../ttyUSB0", 4096) = 13 newfstatat(AT_FDCWD, "/dev/ttyUSB0", {st_mode=S_IFCHR|0660, st_rdev=makedev(0xbc, 0), ...}, AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "/sys/class/tty/usb-1a86_USB2.0-Ser_-if00-port0/device", 0x7fffffffc170, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0 openat(AT_FDCWD, "/usr/bin/__pycache__/esptool.cpython-39.pyc", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/bin/esptool.py", O_RDONLY|O_CLOEXEC) = 3 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2899, ...}, AT_EMPTY_PATH) = 0 ioctl(3, TCGETS, 0x7fffffffb440) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_CUR) = 0 lseek(3, 0, SEEK_CUR) = 0 newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2899, ...}, AT_EMPTY_PATH) = 0 read(3, "#!/usr/bin/python-exec2c\n# vim:f"..., 2900) = 2899 read(3, "", 1) = 0 close(3) = 0 newfstatat(AT_FDCWD, "/usr/bin/esptool.py", {st_mode=S_IFREG|0755, st_size=2899, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/bin/__pycache__", 0x7fffffffad40, 0) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0 mkdir("/usr/bin/__pycache__", 0777) = -1 EACCES (Permission denied) newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0755, st_size=40082, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/lib/python3.9", {st_mode=S_IFDIR|0755, st_size=4124, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/lib/python3.9/lib-dynload", {st_mode=S_IFDIR|0755, st_size=5814, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages", {st_mode=S_IFDIR|0755, st_size=12016, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages/epython.py", {st_mode=S_IFREG|0644, st_size=20, ...}, 0) = 0 newfstatat(AT_FDCWD, "/usr/lib/python3.9/site-packages/epython.py", {st_mode=S_IFREG|0644, st_size=20, ...}, 0) = 0 openat(AT_FDCWD, "/usr/lib/python3.9/site-packages/__pycache__/epython.cpython-39.pyc", O_RDONLY|O_CLOEXEC) = 3 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=156, ...}, AT_EMPTY_PATH) = 0 ioctl(3, TCGETS, 0x7fffffffa450) = -1 ENOTTY (Inappropriate ioctl for device) lseek(3, 0, SEEK_CUR) = 0 lseek(3, 0, SEEK_CUR) = 0 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=156, ...}, AT_EMPTY_PATH) = 0 read(3, "a\r\r\n\0\0\0\0m\242\207a\24\0\0\0\343\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 157) = 156 read(3, "", 1) = 0 close(3) = 0 readlink("/usr/bin/esphome", 0x7fffffffa650, 4096) = -1 EINVAL (Invalid argument) openat(AT_FDCWD, "/usr/lib/python-exec/python3.9/esphome", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "/usr/lib/python-exec/python3.9/e"..., 111/usr/lib/python-exec/python3.9/esphome: this Python implementation (python3.9) is not supported by the script. ) = 111 ```
Poster

strace does not help a lot, but adding "raise 1" to /usr/bin/esptool.py (which is symlink to ../lib/python-exec/python-exec2) help a lot

Traceback (most recent call last):
  File "/usr/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome==2021.11.1', 'console_scripts', 'esphome')())
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main
    return run_esphome(sys.argv)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 378, in command_run
    exit_code = upload_program(config, args, port)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 257, in upload_program
    return upload_using_esptool(config, host)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 243, in upload_using_esptool
    rc = run_esptool(first_baudrate)
  File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 236, in run_esptool
    import esptool
  File "/usr/bin/esptool.py", line 32, in <module>
    raise 1
TypeError: exceptions must derive from BaseException

this is unexpected, it shouldn't import /usr/bin/esptool.py (when argv[0] is esphome)
"mv /usr/bin/esptool.py /usr/bin/esptool" fix the problem

is it broken by gentoo or by esptool build script?

strace does not help a lot, but adding "raise 1" to /usr/bin/esptool.py (which is symlink to ../lib/python-exec/python-exec2) help a lot ``` Traceback (most recent call last): File "/usr/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome==2021.11.1', 'console_scripts', 'esphome')()) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 817, in main return run_esphome(sys.argv) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 804, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 378, in command_run exit_code = upload_program(config, args, port) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 257, in upload_program return upload_using_esptool(config, host) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 243, in upload_using_esptool rc = run_esptool(first_baudrate) File "/usr/lib/python3.9/site-packages/esphome/__main__.py", line 236, in run_esptool import esptool File "/usr/bin/esptool.py", line 32, in <module> raise 1 TypeError: exceptions must derive from BaseException ``` this is unexpected, it shouldn't import /usr/bin/esptool.py (when argv[0] is esphome) "mv /usr/bin/esptool.py /usr/bin/esptool" fix the problem is it broken by gentoo or by esptool build script?
Owner

Mine is named /usr/bin/esptool.py, and works. Currently I have no idea.

Mine is named /usr/bin/esptool.py, and works. Currently I have no idea.
Poster

The problem is /usr/lib/python3.9/site-packages/esphome/main.py line 236, i

with "export ESPHOME_USE_SUBPROCESS=1" kill the problem

[ebuild R ] dev-lang/python-exec-2.4.8:2::gentoo USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_8) (python3_9) (-python3_10)" 0 KiB

with-in process esphome, argv[0] is /usr/bin/esphome;
doing import esptool will import /usr/bin/esptool.py which is /usr/bin/python-exec2, /usr/bin/python-exec2 is expecting argv[0] to be /usr/bin/esptool.py, but actually it get /usr/bin/esphome, this is not the same as running /usr/bin/esptool.py as external command

The problem is /usr/lib/python3.9/site-packages/esphome/__main__.py line 236, i with "export ESPHOME_USE_SUBPROCESS=1" kill the problem ```[ebuild R ] dev-lang/python-exec-2.4.8:2::gentoo USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_8) (python3_9) (-python3_10)" 0 KiB``` with-in process esphome, ```argv[0]``` is /usr/bin/esphome; doing ```import esptool``` will import /usr/bin/esptool.py which is /usr/bin/python-exec2, /usr/bin/python-exec2 is expecting ```argv[0]``` to be /usr/bin/esptool.py, but actually it get /usr/bin/esphome, this is not the same as running /usr/bin/esptool.py as external command
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.