🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Download file as chunks

    General
    2
    4
    6.3k
    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.
    • L
      LastCaress
      last edited by

      So, I'm trying to download a file (a python script) from github as part of my game-project (in micropython). The problem is that I always run out of memory, and was wondering if there's a way to download it with minimal memory usage. I'd like to:
      -Not use custom libraries. (Use the ones that are flashed in default m5stack firmware)
      -Not run a separate python program to download the file

      urequests as chunk isn't implemented, subprocesses I think don't work either... so is there away? (short of splitting the file itself)

      Thanks!

      (using the m5stack base one without PSRAM)

      1 Reply Last reply Reply Quote 0
      • L
        LastCaress
        last edited by

        Maybe the only way is to ask m5stack engineers to add urllib.request to standard libs? :O

        1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3
          last edited by

          Can you split it into levels or zones
          The black core?

          Do you still get the same issue if the file is stored on an SDcard?
          Have you trying compression code tricks used in MP or plane python to reduce memory use?

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • L
            LastCaress
            last edited by m5-docs

            Black core, yes. I managed to do it by using the usocket library directly.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post