paulober / MicroPico

MicroPico (aka Pico-W-Go) is a Visual Studio Code extension designed to simplify and speed up the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards.
https://marketplace.visualstudio.com/items?itemName=paulober.pico-w-go
Mozilla Public License 2.0
291 stars 26 forks source link

Running file deletes all other files from the board #46

Closed radimd closed 1 year ago

radimd commented 1 year ago

What are the steps to reproduce this issue?

  1. Upload project (pico-w-go > Upload project)
  2. Open any .py file
  3. Click Run or right click in project explorer and select pico-w-go > Run current file

What happens?

File runs, but all other files and folders are deleted from the board

What were you expecting to happen?

File runs and the rest of the files and folders stays intact.

Any logs, error output, etc?

(To get extension logs see Terminal > Output > Protcoll (Extensionhost) and copy output concerning picowgo) (If it’s long, please paste to https://gist.github.com and insert the link here)

pico-w-go-run

Any other comments?

Support info

Copy this from the Help -> Info/About -> Copy option in Visual Studio Code:

< Paste Here >
busslina commented 1 year ago

I have same issue. For me only works if everything is in one file. If I had any import (on same folder) it crashes. Ampy workis fine. I only use this extension (for the moment) to enjoy the stubs..

alaub81 commented 1 year ago

I have the same problem. But for me everything is working when I flash my pico w with the old MicroPython Version:

rp2-pico-w-20221201-unstable-v1.19.1-724-gfb7d21153.uf2

So perhaps the problem is caused by newer MicroPython versions

busslina commented 1 year ago

On readme it is said:

Auto-completion based on Raspberry Pi Pico W MicroPython firmware: rp2-pico-w-20230113-unstable-v1.19.1-796-gf4811b0b4.uf2

Maybe we have to wait to this libs get adapted to last version

alaub81 commented 1 year ago

Nope... just tested it with that old Version. Same Problem here.

theobvious89 commented 1 year ago

I have the same problem. But for me everything is working when I flash my pico w with the old MicroPython Version:

rp2-pico-w-20221201-unstable-v1.19.1-724-gfb7d21153.uf2

So perhaps the problem is caused by newer MicroPython versions

I'm having the same issue. I'd like to install the old firmware, but I'm unable to find it. Do you have a link for this version that worked?

alaub81 commented 1 year ago

I have the same problem. But for me everything is working when I flash my pico w with the old MicroPython Version: rp2-pico-w-20221201-unstable-v1.19.1-724-gfb7d21153.uf2 So perhaps the problem is caused by newer MicroPython versions

I'm having the same issue. I'd like to install the old firmware, but I'm unable to find it. Do you have a link for this version that worked?

No Sorry, I have the binary just in my download folder. But here is the upload:

theobvious89 commented 1 year ago

I have the same problem. But for me everything is working when I flash my pico w with the old MicroPython Version: rp2-pico-w-20221201-unstable-v1.19.1-724-gfb7d21153.uf2 So perhaps the problem is caused by newer MicroPython versions

I'm having the same issue. I'd like to install the old firmware, but I'm unable to find it. Do you have a link for this version that worked?

No Sorry, I have the binary just in my download folder. But here is the upload:

Thanks a lot! That makes the development process a lot simpler for me.

kenhavens commented 1 year ago

I've run in to the same issue and am working around it by uploading all project files then executing the following from the REPL prompt ...

exec(open('filename.py').read())

Where filename.py is the file you want to run. Hope that helps!

joostvanhoof commented 1 year ago

Same issue here, it took a while before I realised what was happening as I was adding a package using Thonny, but after running a file that package was suddenly gone.

@alaub81 thanks for the old firmware tip, that solved it!

paulober commented 1 year ago

Can you confirm that this experimental build pico-w-go-2.1.7.zip fixes this issue for you even when running the latest micropython firmware?

theobvious89 commented 1 year ago

Can you confirm that this experimental build pico-w-go-2.1.7.zip fixes this issue for you even when running the latest micropython firmware?

Yes, I can confirm that build fixes the issue with the latest micropython firmware.

alaub81 commented 1 year ago

Can you confirm that this experimental build pico-w-go-2.1.7.zip fixes this issue for you even when running the latest micropython firmware?

Tested it, too! It is working for me! Thank you @paulober

paulober commented 1 year ago

Can you confirm that this experimental build pico-w-go-2.1.7.zip fixes this issue for you even when running the latest micropython firmware?

Tested it, too! It is working for me! Thank you @paulober

Glad to here that it's working for you but credits go to @connorcl