img2logo workaround for Python 3.8
#1
Hello all,

If you are currently "stuck" on an operating system that can only use up to Python 3.8 and are trying to use the img2logo python script to create your own custom boot logos for IronOS, you may find yourself staring at the following error in your console after trying to run the conversion:

[Image: eOHNoNS.jpeg]

This "'type' object is not subscriptable" error occurs because type annotation was added in Python 3.9 and is not present in 3.8 and earlier versions. Thankfully the fix is incredibly simple and does not require changing the part of the code doing the actual work. All you need to do is add a single line at the very top of the file:

Code:
from __future__ import annotations

The above should go on line 3, above the line with "division" in it. Once you add this single line, img2logo will work perfectly.

Hope this helps!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)