uota icon indicating copy to clipboard operation
uota copied to clipboard

Fix ValueError with latest MP

Open ThinkTransit opened this issue 9 months ago • 0 comments

I seem to be having problem with the latest version of MP throwing a ValueError when untaring files.

Traceback (most recent call last):
  File "main.py", line 30, in <module>
  File "uota.py", line 185, in install_new_firmware
  File "tarfile/__init__.py", line 129, in __next__
  File "tarfile/__init__.py", line 107, in next
OSError: [Errno 22] EINVAL

I haven't been able to determine the exact cause but it seems to work fine when using the 'with' keyword on the deflate.

with deflate.DeflateIO(f1, deflate.GZIP) as f2

instead of

f2 = deflate.DeflateIO(f1, deflate.GZIP)

ThinkTransit avatar May 17 '24 02:05 ThinkTransit