Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How to delete the project after updated the latest pymakr version?

    Scheduled Pinned Locked Moved Comments & Feedback
    pytrack
    10 Posts 8 Posters 4.6k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MJ
      last edited by

      Hi, i am using the latest version of pymakr plugin with the "upload" button and "download" button. May i know how can i delete the project file inside the pytrack device?

      T Nagarjuna ReddyN C 3 Replies Last reply Reply Quote 0
      • T Offline
        ThomasBastien @MJ
        last edited by

        @mj Hello, I have the same question using ATOM

        1 Reply Last reply Reply Quote 0
        • Nagarjuna ReddyN Offline
          Nagarjuna Reddy @MJ
          last edited by

          Hi!!!!
          Good afternoon MJ
          I Think you have to Delete /Format flask disk in Micropython its right
          Go ahed in terminal
          import os
          os.mkfs('/flah')

          run that command...
          once run that command format your flask disk like delete all files from your Micropython(Lopy/Wipy) not delete files in your SD card.

          Ch.nagarjuna reddy

          1 Reply Last reply Reply Quote 0
          • sebS Offline
            seb
            last edited by

            Hi,

            There is currently no way to manually delete a file via pymakr. You can either connect to your device via FTP which will allow you to delete files, or format the device by running:

            import os
            os.mkfs('/flash')

            If, for what ever reason, your device is stuck and you cannot get to the REPL please follow the instructions found here https://docs.pycom.io/chapter/toolsandfeatures/bootmodes.html to safe boot into the "factory firmware"

            1 Reply Last reply Reply Quote 0
            • X Offline
              Xykon administrators
              last edited by

              You can also delete individual files from the REPL:

              import os
              os.unlink('file.py')
              

              you can also specify the full path:

              os.unlink('/flash/lib/old_lib.py')
              

              Christian Ehlers

              1 Reply Last reply Reply Quote 0
              • M Offline
                mdnncl01
                last edited by

                hello guys,
                for me it is absolutely essential to understand how to delete a folder from the program with all the subfolders and files; therefore recursive deletion of a specific folder. I tried in every way but nothing, unfortunately shutil.rmtree does not work and it is absurd for me to abandon a project with these devices for this reason. From the program I have to delete only one folder /flash/myFolder. Please help me.

                L 1 Reply Last reply Reply Quote 0
                • L Offline
                  livius @mdnncl01
                  last edited by

                  @mdnncl01
                  try something like this:
                  https://stackoverflow.com/a/2656408/3114457

                  think about people first, then computers

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mdnncl01 @livius
                    last edited by

                    @livius the problem is that shutil.rmtree contains the os.walk attribute that is not supported by our devices

                    Traceback (most recent call last):
                    File "<stdin>", line 16, in <module>
                    File "firmware/lib/shutil.py", line 9, in rmtree
                    AttributeError: 'module' object has no attribute 'walk'

                    L 1 Reply Last reply Reply Quote 0
                    • L Offline
                      livius @mdnncl01
                      last edited by

                      @mdnncl01
                      this was only sample how to go.
                      You can implement this simple operation self, this is not really problem for abandon project ;-)
                      If you do not know how to do this then google is your friend
                      https://stackoverflow.com/a/20530049/3114457

                      think about people first, then computers

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Chris Williams @MJ
                        last edited by livius

                        @MJ On my Pycom.gpy I imported os, took a look at the directory, then os.remove('FILE NAME')

                        >>> import os
                        >>> os.listdir()
                        ['sys', 'lib', 'cert', 'boot.py', '%1', 'test2.py', 'project.pymakr']
                        >>> os.remove('test2.py')
                        >>> os.listdir()
                        ['sys', 'lib', 'cert', 'boot.py', '%1', 'project.pymakr']
                        >>>
                        
                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom