Closed alexbez closed 3 years ago
I'm having the exact same problem
Interesting... I will look into this further, but at first glance it appears micropy thinks it's currently in an active project from your home folder for some reason.
Could you retry the command from a different directory and see if the you get the same results?
Something like: cd /tmp && micropy stubs add <stub>
Thanks
From /tmp directory it works fine.
alexbez@T580:~$ cd /tmp
alexbez@T580:/tmp$ micropy stubs add esp32-micropython-1.12.0
MicroPy Adding esp32-micropython-1.12.0 to stubs
MicroPy Resolving stub...
MicroPy esp32-micropython-1.12.0: 100%|██████████████████████████████████████████████████████████████████████████████| [9.83k/9.83k @ 75.5MB/s]
MicroPy Detected Firmware: micropython
MicroPy Firmware not found locally, attempting to install it...
MicroPy Resolving stub...
MicroPy micropython: 100%|████████████████████████████████████████████████████████████████████████████████████████████| [43.4k/43.4k @ 176MB/s]
MicroPy ✔ micropython firmware added!
MicroPy ✔ esp32-micropython-1.12.0 added!
alexbez@T580:/tmp$
Closing due to staleness and unable to reproduce. Feel free to let me know if this is still an issue.
When trying to add a stub, micropy crashes:
micropy log:
[2021-01-13 18:24:18] DEBUG: hookproxy(add_from_file): Method added to proxy: (<function PackagesModule.add_from_file at 0x7f8b392435e0>, '_hook__add_from_file__path_None__dev_False') [2021-01-13 18:24:18] DEBUG: hookproxy(add_package): Method added to proxy: (<function PackagesModule.add_package at 0x7f8b39243700>, '_hook__add_package__dev_False') [2021-01-13 18:24:18] DEBUG: hookproxy(add_package): Method added to proxy: (<function DevPackagesModule.add_package at 0x7f8b39243b80>, '_hook__add_package__dev_True') [2021-01-13 18:24:18] DEBUG: hookproxy(add_from_file): Method added to proxy: (<function DevPackagesModule.add_from_file at 0x7f8b39243ca0>, '_hook__add_from_file__path_None__dev_True') [2021-01-13 18:24:18] DEBUG: hookproxy(stubs): Method added to proxy: (<function StubsModule.stubs at 0x7f8b391f2430>, '_hook__stubs__') [2021-01-13 18:24:18] DEBUG: hookproxy(add_stub): Method added to proxy: (<function StubsModule.add_stub at 0x7f8b391f28b0>, '_hook__add_stub__') [2021-01-13 18:24:57] DEBUG: hookproxy(add_from_file): Method added to proxy: (<function PackagesModule.add_from_file at 0x7f4efb15d5e0>, '_hook__add_from_file__path_None__dev_False') [2021-01-13 18:24:57] DEBUG: hookproxy(add_package): Method added to proxy: (<function PackagesModule.add_package at 0x7f4efb15d700>, '_hook__add_package__dev_False') [2021-01-13 18:24:57] DEBUG: hookproxy(add_package): Method added to proxy: (<function DevPackagesModule.add_package at 0x7f4efb15db80>, '_hook__add_package__dev_True') [2021-01-13 18:24:57] DEBUG: hookproxy(add_from_file): Method added to proxy: (<function DevPackagesModule.add_from_file at 0x7f4efb15dca0>, '_hook__add_from_file__path_None__dev_True') [2021-01-13 18:24:57] DEBUG: hookproxy(stubs): Method added to proxy: (<function StubsModule.stubs at 0x7f4efb10c430>, '_hook__stubs__') [2021-01-13 18:24:57] DEBUG: hookproxy(add_stub): Method added to proxy: (<function StubsModule.add_stub at 0x7f4efb10c8b0>, '_hook__add_stub__') [2021-01-13 18:24:57] DEBUG: micropy: MicroPy Loaded [2021-01-13 18:24:57] DEBUG: micropy: Running first time setup... [2021-01-13 18:24:57] DEBUG: micropy: Creating .micropy directory @ /home/alexbez/.micropy [2021-01-13 18:24:57] DEBUG: micropy: Starting new HTTPS connection (1): raw.githubusercontent.com:443 [2021-01-13 18:24:58] DEBUG: micropy: https://raw.githubusercontent.com:443 "GET /BradenM/micropy-stubs/master/source.json HTTP/1.1" 200 1479 [2021-01-13 18:24:58] DEBUG: micropy.config.config: loaded config values [2021-01-13 18:24:58] DEBUG: alexbez: adding module: StubsModule [2021-01-13 18:24:58] DEBUG: alexbez: adding module: PackagesModule [2021-01-13 18:24:58] DEBUG: alexbez: adding module: DevPackagesModule [2021-01-13 18:24:58] DEBUG: alexbez: adding module: TemplatesModule [2021-01-13 18:24:58] INFO: micropy: Loading Project [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> {} [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> {} [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> {} [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> set() [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> {} [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [paths] -> [] [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [stubs] -> {} [2021-01-13 18:24:58] DEBUG: alexbez: loading requirements from: /home/alexbez/dev-requirements.txt [2021-01-13 18:24:58] DEBUG: <packagedependencysource micropy-cli>: Starting new HTTPS connection (1): pypi.org:443 [2021-01-13 18:24:58] DEBUG: <packagedependencysource micropy-cli>: https://pypi.org:443 "GET /pypi/micropy-cli/json HTTP/1.1" 200 12268 [2021-01-13 18:24:58] DEBUG: alexbez: dumping to dev-requirements.txt [2021-01-13 18:24:58] DEBUG: alexbez: dumping: ['micropy-cli\n'] [2021-01-13 18:24:58] DEBUG: micropy.config.config: set config value [paths] => [PosixPath('/home/alexbez/.micropy/alexbez1')] [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [dev-packages] -> ['micropy-cli'] [2021-01-13 18:24:58] DEBUG: micropy.config.config_source: creating new config file: /home/alexbez/.micropy/.cache [2021-01-13 18:24:58] DEBUG: alexbez: loading requirements from: /home/alexbez/requirements.txt [2021-01-13 18:24:58] DEBUG: alexbez: dumping to requirements.txt [2021-01-13 18:24:58] DEBUG: alexbez: dumping: [] [2021-01-13 18:24:58] DEBUG: micropy.config.config: set config value [paths] => [PosixPath('/home/alexbez/.micropy/alexbez1')] [2021-01-13 18:24:58] DEBUG: micropy.config.config: added config value [packages] -> []