Traceback (most recent call last): File "/usr/lib/python-exec/python3.12/esptool.py", line 34, in <module> import esptool ...repeating File "/usr/lib/python-exec/python3.12/esptool.py", line 34, in <module> import esptool File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1322, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 1262, in _find_spec File "<frozen importlib._bootstrap_external>", line 1528, in find_spec File "<frozen importlib._bootstrap_external>", line 1502, in _get_spec File "<frozen importlib._bootstrap_external>", line 1635, in find_spec File "<frozen importlib._bootstrap_external>", line 1590, in _get_spec File "<frozen importlib._bootstrap_external>", line 828, in spec_from_file_location File "<frozen importlib._bootstrap_external>", line 187, in _path_abspath RecursionError: maximum recursion depth exceeded python3.11 has the same issue. dev-embedded/esptool-4.6.2 seems to work fine
The previous version also works for me. The following also works python3.12 /usr/bin/esptool.py So it seems it is the python-exec stuff that is screwed up. I don't know enough about what that is trying to do to debug further.
I can confirm both reports - executing esptool.py ends up with the RecursionError, and python3.12 /usr/bin/esptool.py is working. As I am no real python expert, I seek for help and call back....
This package obviously needs to be a single-impl python thing. My workaround: ``` python3.11 $(which esptool.py) --baud 115200 --port /dev/ttyUSB0 write_flash 0x0 firmware-heltec-v2_1-2.3.13.83f5ba0.bin ```
(In reply to Matt Jolly from comment #3) > This package obviously needs to be a single-impl python thing. > I confirm that re-adding DISTUTILS_SINGLE_IMPL=1 gives the functionality back immediately. But @flow has removed exactly this in commit f1fac2d9fe with the comment: There seems to be no reason why esptool is python single-impl. Being python single-impl causes issues for consumer of the dev-embedded/esptool dependency. For example, dev-embedded/esp-idf (from ::guru), currently declares the dev-embedded/esptool dependency without [${PYTHON_USEDEP}] as consequence of this. So there is the question if there is a solution for both options - but I must say that's beyond my personal knowledge. Python experts, please have an eye on this here!