Stream operation not supported: Explanation?

  • 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 "", line 55, in <module>
    File "/flash/lib/", line 54, in update
    File "/flash/lib/", 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!

  • I am following the approach from The code lines which are making the problem are in 1.0.0/flash/lib/

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

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

  • 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.

Log in to reply

Pycom on Twitter