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

    Stream operation not supported: Explanation?

    Scheduled Pinned Locked Moved GPy
    3 Posts 2 Posters 39 Views 2 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.
    • C Offline
      Cédric Antenen
      last edited by

      Hello other engineers

      Micropython forum suggested to post this here.

      I have a question about a stream operation which is not supported. I try to make an over the air update (OTA) with LTE. I got a working LTE connection and also the manifest is made within a localhost with the new version in it. The problem is that this manifest can not be streamed caused by this error. Can someone help and explain what this is and what I need to do that it is working?

      Traceback (most recent call last):
      File "main.py", line 55, in <module>
      File "/flash/lib/OTA.py", line 54, in update
      File "/flash/lib/OTA.py", line 49, in get_update_manifest
      OSError: stream operation not supported
      Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28; GPy with ESP32
      Pybytes Version: 1.7.1
      Type "help()" for more information.

      If you need further information just ask. :D
      Thanks a lot!

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

        Hello Cédric.

        The error "OSError: stream operation not supported" happens when you call a streaming object with a read or write function that it does not support.

        If you want more help from us, you will have to post the code block that is giving the error with enough context surrounding lines.

        1 Reply Last reply Reply Quote 0
        • C Offline
          Cédric Antenen
          last edited by Cédric Antenen

          I am following the approach from https://github.com/pycom/pycom-libraries/tree/master/examples/OTA. The code lines which are making the problem are in 1.0.0/flash/lib/OTA.py:

          def get_update_manifest(self):
              print(self.get_current_version())
              req = "manifest.json?current_ver={}".format(self.get_current_version())
              manifest_data = self.get_data(req).decode()
              print(manifest_data)
              manifest = ujson.load(manifest_data)
              gc.collect()
              return manifest
          

          I hope you can help me to fix my code so that a basic program can be updated over the air.

          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