0

Trinket M0 Cannot edit or delete code.py
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket M0 Cannot edit or delete code.py

by mseeba on Fri Jan 25, 2019 12:56 am

I have been playing around very successfully with my Trinket M0 until today. I went to make a minor change to my code.py file by updating the color of the dotstar on a certain condition. When I saved it seemed to wipe out the file. I tried copying the code back in from my most recent backup and saving the file but that would not take.

I tried deleting the file but it just reappears.

I have a good backup so I entered bootloader mode and updated the bootloader and reflashed circuit python, which seemed to go perfectly. But, I still cannot delete or change my code.py file. I did delete main.py successfully.

It seems stuck with a bad code.py file and just hung there.

Any ideas what happened and how to fix?
Thanks.

mseeba
 
Posts: 7
Joined: Thu Nov 22, 2018 6:06 pm

Re: Trinket M0 Cannot edit or delete code.py

by johnpark on Fri Jan 25, 2019 9:11 pm

Sounds like you may want to do a full erase of the board with the storage.erase_filesystem() command: https://learn.adafruit.com/welcome-to-c ... sues-19-20

johnpark
 
Posts: 367
Joined: Wed Mar 25, 2009 2:15 pm

Re: Trinket M0 Cannot edit or delete code.py

by mseeba on Sat Feb 02, 2019 8:54 pm

That seems to have done the trick.
Thanks for the help.

mseeba
 
Posts: 7
Joined: Thu Nov 22, 2018 6:06 pm

Re: Trinket M0 Cannot edit or delete code.py

by johnpark on Sun Feb 03, 2019 2:00 pm

Glad to hear it!

johnpark
 
Posts: 367
Joined: Wed Mar 25, 2009 2:15 pm

Please be positive and constructive with your questions and comments.