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
173 stars 14 forks source link

Failed to execute script error #54

Closed Fischchen closed 3 years ago

Fischchen commented 3 years ago

Hey everybody, I’m currently trying to create a stub for my PYboard but am just getting this error:

MicroPy  Connecting to Pyboard @ COM5
MicroPy  ✔ Connected!
MicroPy  Executing stubber on pyboard...
MicroPy  Failed to execute script: ('exception', b'', b'Traceback (most recent call last):\r\n  File "<stdin>", line 255, in <module>\r\n  File "<stdin>", line 252, in main\r\n  File "<stdin>", line 184, in clean\r\nOSError: [Errno 2] ENOENT\r\n')

Can anybody help me? I tried different versions and have reinstalled it multiple times.

Thanks in advance, Fischchen

Josverl commented 3 years ago

Hi, can you give a bit more info , such as which version of makestubs.py you are running? i have little visibility on which version MicroPy uses and without that it is hard to pinpoint the issue. from the error :

, in clean
OSError: [Errno 2] ENOENT\r\n')`

it appears to fail on a File/Folder not found error in the clean method. that has worked for the last 2 years across ports, I added some additional logic some 5 months ago without the version of the script, and the hardware / firmware versions I can't find or fix the issue

https://github.com/Josverl/micropython-stubber/blob/30490303e33c4c8e2b3e77a91727e992afc96cc3/board/createstubs.py#L338-L357

Note that you seem to be using the minified version , so the line numbers may be different