benno1237 / MinePI

Minecraft utility library
MIT License
20 stars 8 forks source link

'int' object is not subscriptable #13

Closed GoodDay360 closed 1 year ago

GoodDay360 commented 2 years ago

image

async def manage():
    image = Image.open(r"C:\Users\Administrator\Downloads\txeDB5P.png")
    image = await MinePI.render_3d_skin(skin_image=image,aa=True)
    image.show()
asyncio.run(manage())

Possible Solution:

async def manage():
    image = Image.open(r"C:\Users\Administrator\Downloads\txeDB5P.png")
    image.load()
    image = image.convert("RGBA")
    image = await MinePI.render_3d_skin(skin_image=image,aa=True)
    image.show())
asyncio.run(manage())

txeDB5P

benno1237 commented 2 years ago

That's a known issue with non RGBA images. I am not sure yet whether i will fix that in the next release or just add a warning in the docs. Thanks for bringing it up again tho.

benno1237 commented 1 year ago

Going to close this as it was fixed in the latest release. Please refer to the docs (https://minepi.readthedocs.io/en/latest/) before updating. The library structure changed quite a lot.