0

I get following error in my python code:

  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

Code that makes problems:

    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

In the following folder you will find my code: https://github.com/antec1/Control_Unit

Would be very kind if you could help me to get rid of this error.

antec1
  • 1

1 Answers1

1

Use ujson.loads() instead of ujson.load() to load from a string

Syscall
  • 19,327
  • 10
  • 37
  • 52
Joe
  • 11
  • 1