Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
183 stars 13 forks source link

stubber createstubs aborts on error while stubbing one board #587

Open Josverl opened 5 months ago

Josverl commented 5 months ago

stubber createstubs aborts on error while stubbing one board

Expected one of

Boards

┏━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Serial Port  ┃ Port    ┃ Description                         ┃ Version ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ /dev/ttyACM0 │ stm32   │ PYBv1.1 with STM32F405RG            │ 1.22.2  │
│ /dev/ttyACM1 │ rp2     │ Raspberry Pi Pico W with RP2040     │ 1.22.2  │
│ /dev/ttyUSB0 │ esp32   │ Generic ESP32 module with ESP32     │ 1.22.2  │
│ /dev/ttyUSB1 │         │                                     │         │
│ /dev/ttyUSB2 │ esp32   │ Generic ESP32S3 module with ESP32S3 │ 1.22.2  │
│ /dev/ttyUSB3 │ esp8266 │ ESP module with ESP8266             │ 1.22.2  │
└──────────────┴─────────┴─────────────────────────────────────┴─────────┘

https://github.com/Josverl/micropython-stubs/actions/runs/9635952716/job/26573327512#step:11:275

Details

22:16:47|INFO |mcu_stubber - Connecting using /dev/ttyACM1 to rp2 RPI_PICO_W 1.22.2: Raspberry Pi Pico W with RP2040 22:16:50|INFO |runner - Install github:josverl/micropython-stubber/mip/mpy_v6.json 22:16:50|INFO |runner - Installing github:josverl/micropython-stubber/mip/mpy_v6.json to /lib 22:16:50|INFO |runner - Installing: /lib/createstubs.mpy 22:16:50|INFO |runner - Installing: /lib/createstubs_mem.mpy 22:16:50|INFO |runner - Installing: /lib/createstubs_db.mpy 22:16:50|INFO |runner - Installing: /lib/modulelist.txt 22:16:50|INFO |runner - Done 22:16:50|INFO |mcu_stubber - Writing BOARDNAME='RPI_PICO_W' to boardname.py 22:16:50|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:16:52|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:16:52|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:16:52|INFO |runner - Starting new run 22:16:53|INFO |runner - Found BOARDNAME: RPI_PICO_W 22:16:53|INFO |runner - Port: rp2 22:16:53|INFO |runner - Board: RPI_PICO_W 22:16:53|INFO |runner - Clean/remove files in folder: /remote/stubs/micropython-v1_22_2-rp2-RPI_PICO_W 22:16:53|INFO |runner - Report file: /remote/stubs/micropython-v1_22_2-rp2-RPI_PICO_W/modules.json 22:16:53|INFO |runner - Stub module: _asyncio to file: _asyncio.pyi mem:165168 22:16:55|INFO |runner - Stub module: _boot_fat to file: _boot_fat.pyi mem:163680 22:16:55|INFO |runner - Stub module: _onewire to file: _onewire.pyi mem:164288 22:16:57|INFO |runner - Stub module: _rp2 to file: _rp2.pyi mem:164096 22:16:58|INFO |runner - Stub module: _thread to file: _thread.pyi mem:164080 22:16:59|INFO |runner - Stub module: aioble.__init__ to file: __init__.pyi mem:158176 22:17:00|INFO |runner - Stub module: aioble.central to file: central.pyi mem:158432 22:17:01|INFO |runner - Stub module: aioble.client to file: client.pyi mem:156352 22:17:03|INFO |runner - Stub module: aioble.core to file: core.pyi mem:156464 22:17:03|INFO |runner - Stub module: aioble.device to file: device.pyi mem:156464 22:17:04|INFO |runner - Stub module: aioble.l2cap to file: l2cap.pyi mem:155280 22:17:05|INFO |runner - Stub module: aioble.peripheral to file: peripheral.pyi mem:155536 22:17:06|INFO |runner - Stub module: aioble.security to file: security.pyi mem:154080 22:17:06|INFO |runner - Stub module: aioble.server to file: server.pyi mem:155152 22:17:08|INFO |runner - Stub module: array to file: array.pyi mem:154752 22:17:09|INFO |runner - Stub module: asyncio.__init__ to file: __init__.pyi mem:152592 22:17:11|INFO |runner - Stub module: asyncio.core to file: core.pyi mem:150336 22:17:12|INFO |runner - Stub module: asyncio.event to file: event.pyi mem:150336 22:17:12|INFO |runner - Stub module: asyncio.funcs to file: funcs.pyi mem:150336 22:17:13|INFO |runner - Stub module: asyncio.lock to file: lock.pyi mem:150336 22:17:13|INFO |runner - Stub module: asyncio.stream to file: stream.pyi mem:150336 22:17:14|INFO |runner - Stub module: binascii to file: binascii.pyi mem:149936 22:17:15|INFO |runner - Stub module: bluetooth to file: bluetooth.pyi mem:149936 22:17:16|ERROR |runner - Traceback (most recent call last): 22:17:16|INFO |runner - File "createstubs.py", line 828, in 22:17:16|INFO |runner - File "createstubs.py", line 800, in main 22:17:16|INFO |runner - File "createstubs.py", line 742, in get_modules 22:17:16|ERROR |runner - UnicodeError: 22:17:16|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:17:32|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:17:34|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:17:34|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:17:34|ERROR |runner - Traceback (most recent call last): 22:17:34|ERROR |runner - ImportError: no module named 'createstubs_db' 22:17:34|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:17:49|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:17:52|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:17:52|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:17:52|ERROR |runner - Traceback (most recent call last): 22:17:52|ERROR |runner - ImportError: no module named 'createstubs_db' 22:17:52|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:18:07|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:18:09|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:18:09|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:18:09|ERROR |runner - Traceback (most recent call last): 22:18:09|ERROR |runner - ImportError: no module named 'createstubs_db' 22:18:09|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:18:25|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:18:27|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:18:27|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:18:27|ERROR |runner - Traceback (most recent call last): 22:18:27|ERROR |runner - ImportError: no module named 'createstubs_db' 22:18:27|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:18:42|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:18:44|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:18:44|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:18:45|ERROR |runner - Traceback (most recent call last): 22:18:45|ERROR |runner - ImportError: no module named 'createstubs_db' 22:18:45|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:19:00|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:19:02|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:19:02|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:19:02|ERROR |runner - Traceback (most recent call last): 22:19:02|ERROR |runner - ImportError: no module named 'createstubs_db' 22:19:02|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:19:17|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:19:20|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:19:20|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:19:20|ERROR |runner - Traceback (most recent call last): 22:19:20|ERROR |runner - ImportError: no module named 'createstubs_db' 22:19:20|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:19:35|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:19:37|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:19:37|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:19:37|ERROR |runner - Traceback (most recent call last): 22:19:37|ERROR |runner - ImportError: no module named 'createstubs_db' 22:19:38|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote 22:19:53|INFO |mcu_stubber - Resetting /dev/ttyACM1 Raspberry Pi Pico W with RP2040 22:19:55|INFO |mcu_stubber - Running createstubs db on /dev/ttyACM1 Raspberry Pi Pico W with RP2040 using temp path: /tmp/board_stubberb10mdrab 22:19:55|INFO |mcu_stubber - Running : mpremote mount /tmp/board_stubberb10mdrab exec import createstubs_db 22:19:55|ERROR |runner - Traceback (most recent call last): 22:19:55|ERROR |runner - ImportError: no module named 'createstubs_db' 22:19:55|INFO |runner - Local directory /tmp/board_stubberb10mdrab is mounted at /remote Traceback (most recent call last): File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/tenacity/__init__.py", line 382, in __call__ result = fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/stubber/bulk/mcu_stubber.py", line 164, in run_createstubs raise MemoryError("Memory error, try again") MemoryError: Memory error, try again The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/bin/stubber", line 8, in sys.exit(stubber_cli()) ^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 1719, in invoke rv.append(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line [143](https://github.com/Josverl/micropython-stubs/actions/runs/9635952716/job/26573323378#step:11:144)4, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/stubber/commands/get_mcu_cmd.py", line 56, in cli_create_mcu_stubs exit(stub_connected_mcus(variant=variant, format=format, debug=debug)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/stubber/bulk/mcu_stubber.py", line 399, in stub_connected_mcus rc, my_stubs = generate_board_stubs(temp_path, board, variant, form) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/stubber/bulk/mcu_stubber.py", line 205, in generate_board_stubs rc, out = run_createstubs(dest, mcu, variant) # , host_mounted=host_mounted) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/tenacity/__init__.py", line 289, in wrapped_f return self(f, *args, **kw) ^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/tenacity/__init__.py", line 379, in __call__ do = self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jos/actions-runner/_work/_tool/Python/3.11.9/x64/lib/python3.11/site-packages/tenacity/__init__.py", line 326, in iter raise retry_exc from fut.exception() tenacity.RetryError: RetryError[]