Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stuck because cannot delete user storage #345

Closed
thiswillbeyourgithub opened this issue Jul 20, 2022 · 3 comments
Closed

stuck because cannot delete user storage #345

thiswillbeyourgithub opened this issue Jul 20, 2022 · 3 comments

Comments

@thiswillbeyourgithub
Copy link
Contributor

Hi!

While playing around with sleep logging for a while, I ended up saving a lot of files on my pinetime.

The issue is that my folder logs/sleep contains so many files that I get a memory error trying to display it, so I can't remove those files because I can't get their names.

I tried playing around with things like for l in os.listdir("logs/sleep"): os.remove(l) but I still get the memory error, even by launching it in the first line of main.py.

Any idea how I could solve this? I stumbled upon os.ilistdir link which returns a generator instead of a full list but it does not seem implemented in waspos.

@daniel-thompson
Copy link
Collaborator

Take a look at https://github.com/daniel-thompson/wasp-os/blob/master/wasp/boards/pinetime/watch.py.in#L107 .

I think the simplest way to reset this would be to backup anything you need from the filesystem and then boot into safe mode, umount /flash and run mkfs by hand.

@daniel-thompson
Copy link
Collaborator

(or just build a custom wasp-os binary with lines 103-106 commented out and the except block outdented... then go back to a normal build)

@thiswillbeyourgithub
Copy link
Contributor Author

thiswillbeyourgithub commented Jul 25, 2022

(or just build a custom wasp-os binary with lines 103-106 commented out and the except block outdented... then go back to a normal build)

I will try this. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants